--- old/src/hotspot/share/interpreter/abstractInterpreter.cpp 2018-09-25 19:23:44.000000000 +0300 +++ new/src/hotspot/share/interpreter/abstractInterpreter.cpp 2018-09-25 19:23:44.000000000 +0300 @@ -1,5 +1,6 @@ /* * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015-2018, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -188,6 +189,37 @@ default : break; } +#ifdef AARCH32 + if (UseAESIntrinsics) { + // Use optimized stub code for AES native methods. + switch (m->intrinsic_id()) { + case vmIntrinsics::_aescrypt_encryptBlock : return com_sun_crypto_provider_AESCrypt_encryptBlock; + case vmIntrinsics::_aescrypt_decryptBlock : return com_sun_crypto_provider_AESCrypt_decryptBlock; + } + // Use optimized stub code for AES CBC native methods. + if (StubRoutines::cipherBlockChaining_encryptAESCrypt_special() && + m->intrinsic_id() == vmIntrinsics::_cipherBlockChaining_encryptAESCrypt) + return com_sun_crypto_provider_CipherBlockChaining_encrypt; + + if (StubRoutines::cipherBlockChaining_decryptAESCrypt_special() && + m->intrinsic_id() == vmIntrinsics::_cipherBlockChaining_decryptAESCrypt) + return com_sun_crypto_provider_CipherBlockChaining_decrypt; + } + + // Use optimized stub code for SHA256/512 native methods. + switch (m->intrinsic_id()) { + case vmIntrinsics::_sha_implCompress : + if (UseSHA1Intrinsics) return sun_security_provider_SHA_implCompress; + break; + case vmIntrinsics::_sha2_implCompress : + if (UseSHA256Intrinsics) return sun_security_provider_SHA2_implCompress; + break; + case vmIntrinsics::_sha5_implCompress : + if (UseSHA512Intrinsics) return sun_security_provider_SHA5_implCompress; + break; + } +#endif + // Accessor method? if (m->is_getter()) { // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters. @@ -282,6 +314,15 @@ case java_util_zip_CRC32_updateByteBuffer : tty->print("java_util_zip_CRC32_updateByteBuffer"); break; case java_util_zip_CRC32C_updateBytes : tty->print("java_util_zip_CRC32C_updateBytes"); break; case java_util_zip_CRC32C_updateDirectByteBuffer: tty->print("java_util_zip_CRC32C_updateDirectByteByffer"); break; +#ifdef AARCH32 + case com_sun_crypto_provider_AESCrypt_encryptBlock : tty->print("com_sun_crypto_provider_AESCrypt_encryptBlock"); break; + case com_sun_crypto_provider_AESCrypt_decryptBlock : tty->print("com_sun_crypto_provider_AESCrypt_decryptBlock"); break; + case com_sun_crypto_provider_CipherBlockChaining_encrypt : tty->print("com_sun_crypto_provider_CipherBlockChaining_encrypt"); break; + case com_sun_crypto_provider_CipherBlockChaining_decrypt : tty->print("com_sun_crypto_provider_CipherBlockChaining_decrypt"); break; + case sun_security_provider_SHA_implCompress : tty->print("sun_security_provider_SHA_implCompress"); break; + case sun_security_provider_SHA2_implCompress : tty->print("sun_security_provider_SHA2_implCompress"); break; + case sun_security_provider_SHA5_implCompress : tty->print("sun_security_provider_SHA5_implCompress"); break; +#endif default: if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST) {