mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8152483: Fix a couple of tests that are being incorrectly run on C1 after jigsaw M3
Reviewed-by: ctornqvi, kvn
This commit is contained in:
parent
9978f9b065
commit
1bd14828a0
2 changed files with 13 additions and 3 deletions
|
@ -58,6 +58,7 @@ import jdk.internal.org.objectweb.asm.Opcodes;
|
||||||
import jdk.internal.org.objectweb.asm.Type;
|
import jdk.internal.org.objectweb.asm.Type;
|
||||||
import jdk.internal.vm.annotation.Stable;
|
import jdk.internal.vm.annotation.Stable;
|
||||||
import jdk.test.lib.Asserts;
|
import jdk.test.lib.Asserts;
|
||||||
|
import jdk.test.lib.Platform;
|
||||||
import jdk.internal.misc.Unsafe;
|
import jdk.internal.misc.Unsafe;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -73,9 +74,11 @@ public class UnsafeGetConstantField {
|
||||||
static final Unsafe U = Unsafe.getUnsafe();
|
static final Unsafe U = Unsafe.getUnsafe();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
testUnsafeGetAddress();
|
if (Platform.isServer()) {
|
||||||
testUnsafeGetField();
|
testUnsafeGetAddress();
|
||||||
testUnsafeGetFieldUnaligned();
|
testUnsafeGetField();
|
||||||
|
testUnsafeGetFieldUnaligned();
|
||||||
|
}
|
||||||
System.out.println("TEST PASSED");
|
System.out.println("TEST PASSED");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ import java.util.concurrent.Callable;
|
||||||
|
|
||||||
import static jdk.internal.misc.Unsafe.*;
|
import static jdk.internal.misc.Unsafe.*;
|
||||||
import static jdk.test.lib.Asserts.*;
|
import static jdk.test.lib.Asserts.*;
|
||||||
|
import static jdk.test.lib.Platform;
|
||||||
|
|
||||||
public class UnsafeGetStableArrayElement {
|
public class UnsafeGetStableArrayElement {
|
||||||
@Stable static final boolean[] STABLE_BOOLEAN_ARRAY = new boolean[16];
|
@Stable static final boolean[] STABLE_BOOLEAN_ARRAY = new boolean[16];
|
||||||
|
@ -219,6 +220,12 @@ public class UnsafeGetStableArrayElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
if (Platform.isServer()) {
|
||||||
|
test();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test() throws Exception {
|
||||||
// boolean[], aligned accesses
|
// boolean[], aligned accesses
|
||||||
testMatched( Test::testZ_Z, Test::changeZ);
|
testMatched( Test::testZ_Z, Test::changeZ);
|
||||||
testMismatched(Test::testZ_B, Test::changeZ);
|
testMismatched(Test::testZ_B, Test::changeZ);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue