8080600: AARCH64: testlibrary does not support AArch64
Summary: Add Platform.isAArch64(). Use it in mathexact intrinsic tests.
Reviewed-by: kvn, roland
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/IntrinsicBase.java Tue May 19 16:05:12 2015 +0200
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/IntrinsicBase.java Wed May 20 10:21:02 2015 +0100
@@ -129,7 +129,8 @@
@Override
protected boolean isIntrinsicSupported() {
- return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && (Platform.isX86() || Platform.isX64());
+ return isServerVM() && Boolean.valueOf(useMathExactIntrinsics)
+ && (Platform.isX86() || Platform.isX64() || Platform.isAArch64());
}
@Override
@@ -146,7 +147,7 @@
@Override
protected boolean isIntrinsicSupported() {
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) &&
- (Platform.isX64() || Platform.isPPC());
+ (Platform.isX64() || Platform.isPPC() || Platform.isAArch64());
}
@Override
--- a/hotspot/test/testlibrary/jdk/test/lib/Platform.java Tue May 19 16:05:12 2015 +0200
+++ b/hotspot/test/testlibrary/jdk/test/lib/Platform.java Wed May 20 10:21:02 2015 +0100
@@ -132,6 +132,10 @@
return isArch("(amd64)|(x86_64)");
}
+ public static boolean isAArch64() {
+ return isArch("aarch64");
+ }
+
private static boolean isArch(String archnameRE) {
return Pattern.compile(archnameRE, Pattern.CASE_INSENSITIVE)
.matcher(osArch)
--- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java Tue May 19 16:05:12 2015 +0200
+++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java Wed May 20 10:21:02 2015 +0100
@@ -45,7 +45,7 @@
*/
public class TestMutuallyExclusivePlatformPredicates {
private static enum MethodGroup {
- ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"),
+ ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64", "isAArch64"),
BITNESS("is32bit", "is64bit"),
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),