< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.cpp

Print this page

        

@@ -1,7 +1,8 @@
 /*
  * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -186,10 +187,41 @@
     case vmIntrinsics::_Reference_get
                               : return java_lang_ref_reference_get;
     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.
     // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero,
     // then the call above updated to ::is_accessor

@@ -280,10 +312,19 @@
     case java_util_zip_CRC32_update           : tty->print("java_util_zip_CRC32_update"); break;
     case java_util_zip_CRC32_updateBytes      : tty->print("java_util_zip_CRC32_updateBytes"); break;
     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) {
         const char* kind_name = vmIntrinsics::name_at(method_handle_intrinsic(kind));
         if (kind_name[0] == '_')  kind_name = &kind_name[1];  // '_invokeExact' => 'invokeExact'
< prev index next >