[aarch64-port-dev ] UseSHA flag is a bit inconsistent on AArch64
Alexeev, Alexander
Alexander.Alexeev at caviumnetworks.com
Mon Jun 1 14:23:24 UTC 2015
Hello
I noticed a couple of inconsistences related to UseSHA flag on AArch64
1. Comments for this flag in globals.hpp says "Control whether SHA instructions can be used on SPARC"
2. Two rules for the flag defined in test suite are broken. (Although rules defined for Sparc)
a. UseSHA option should be disabled when all UseSHA*Intrinsics are disabled
b. UseSHA option should be disabled when all UseSHA*Intrinsics are disabled even if UseSHA flag set to JVM
Proposed fixes for both issues are below
--- CUT HERE ---
--- old/src/cpu/aarch64/vm/vm_version_aarch64.cpp 2015-06-01 14:19:20.854027000 +0000
+++ new/src/cpu/aarch64/vm/vm_version_aarch64.cpp 2015-06-01 14:19:20.664027000 +0000
@@ -228,6 +228,9 @@
warning("SHA512 instruction (for SHA-384 and SHA-512) is not available on this CPU.");
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
}
+ if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) {
+ FLAG_SET_DEFAULT(UseSHA, false);
+ }
}
// This machine allows unaligned memory accesses
--- old/src/share/vm/runtime/globals.hpp 2015-06-01 14:19:21.594027000 +0000
+++ new/src/share/vm/runtime/globals.hpp 2015-06-01 14:19:21.374027000 +0000
@@ -639,7 +639,8 @@
"Control whether AES instructions can be used on x86/x64") \
\
product(bool, UseSHA, false, \
- "Control whether SHA instructions can be used on SPARC") \
+ "Control whether SHA instructions can be used" \
+ "on SPARC and AArch64") \
\
product(size_t, LargePageSizeInBytes, 0, \
"Large page size (0 to let VM choose the page size)") \
--- CUT HERE ---
Wbr,
Alexander
More information about the aarch64-port-dev
mailing list