8275052: AArch64: Severe AES/GCM slowdown on MacOS for short blocks

Reviewed-by: ngasson, adinn
This commit is contained in:
Andrew Haley 2021-10-28 15:51:29 +00:00
parent c92f230557
commit cb989cf3a1
2 changed files with 9 additions and 9 deletions

View File

@ -7375,12 +7375,6 @@ class StubGenerator: public StubCodeGenerator {
}
#endif // COMPILER2
// generate GHASH intrinsics code
if (UseGHASHIntrinsics) {
// StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks();
StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks_wide();
}
if (UseBASE64Intrinsics) {
StubRoutines::_base64_encodeBlock = generate_base64_encodeBlock();
StubRoutines::_base64_decodeBlock = generate_base64_decodeBlock();
@ -7395,9 +7389,15 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_aescrypt_decryptBlock = generate_aescrypt_decryptBlock();
StubRoutines::_cipherBlockChaining_encryptAESCrypt = generate_cipherBlockChaining_encryptAESCrypt();
StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_decryptAESCrypt();
StubRoutines::_galoisCounterMode_AESCrypt = generate_galoisCounterMode_AESCrypt();
StubRoutines::_counterMode_AESCrypt = generate_counterMode_AESCrypt();
}
if (UseGHASHIntrinsics) {
// StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks();
StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks_wide();
}
if (UseAESIntrinsics && UseGHASHIntrinsics) {
StubRoutines::_galoisCounterMode_AESCrypt = generate_galoisCounterMode_AESCrypt();
}
if (UseSHA1Intrinsics) {
StubRoutines::_sha1_implCompress = generate_sha1_implCompress(false, "sha1_implCompress");

View File

@ -60,8 +60,8 @@ void VM_Version::get_os_cpu_info() {
assert(cpu_has("hw.optional.neon"), "should be");
_features = CPU_FP | CPU_ASIMD;
// All Apple-darwin Arm processors have AES.
_features |= CPU_AES;
// All Apple-darwin Arm processors have AES and PMULL.
_features |= CPU_AES | CPU_PMULL;
// Only few features are available via sysctl, see line 614
// https://opensource.apple.com/source/xnu/xnu-6153.141.1/bsd/kern/kern_mib.c.auto.html