Skip to content
Permalink
Browse files
8275052: AArch64: Severe AES/GCM slowdown on MacOS for short blocks
Reviewed-by: ngasson, adinn
  • Loading branch information
Andrew Haley committed Oct 28, 2021
1 parent c92f230 commit cb989cf3a182ee07fe127b4536e7ff4213f31eaf
Showing 2 changed files with 9 additions and 9 deletions.
@@ -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");
@@ -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

1 comment on commit cb989cf

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on cb989cf Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.