< prev index next >

src/hotspot/share/interpreter/templateInterpreterGenerator.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.

   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 210 
 211   AbstractInterpreter::initialize_method_handle_entries();
 212 
 213   // all native method kinds (must be one contiguous block)
 214   Interpreter::_native_entry_begin = Interpreter::code()->code_end();
 215   method_entry(native)
 216   method_entry(native_synchronized)
 217   Interpreter::_native_entry_end = Interpreter::code()->code_end();
 218 
 219   method_entry(java_util_zip_CRC32_update)
 220   method_entry(java_util_zip_CRC32_updateBytes)
 221   method_entry(java_util_zip_CRC32_updateByteBuffer)
 222   method_entry(java_util_zip_CRC32C_updateBytes)
 223   method_entry(java_util_zip_CRC32C_updateDirectByteBuffer)
 224 
 225   method_entry(java_lang_Float_intBitsToFloat);
 226   method_entry(java_lang_Float_floatToRawIntBits);
 227   method_entry(java_lang_Double_longBitsToDouble);
 228   method_entry(java_lang_Double_doubleToRawLongBits);
 229 























 230 #undef method_entry
 231 
 232   // Bytecodes
 233   set_entry_points_for_all_bytes();
 234 
 235   // installation of code in other places in the runtime
 236   // (ExcutableCodeManager calls not needed to copy the entries)
 237   set_safepoints_for_all_bytes();
 238 
 239   { CodeletMark cm(_masm, "deoptimization entry points");
 240     Interpreter::_deopt_entry[0] = EntryPoint();
 241     Interpreter::_deopt_entry[0].set_entry(vtos, generate_deopt_entry_for(vtos, 0));
 242     for (int i = 1; i < Interpreter::number_of_deopt_entries; i++) {
 243       address deopt_itos = generate_deopt_entry_for(itos, i);
 244       Interpreter::_deopt_entry[i] =
 245         EntryPoint(
 246                    deopt_itos, /* btos */
 247                    deopt_itos, /* ztos */
 248                    deopt_itos, /* ctos */
 249                    deopt_itos, /* stos */


 443                                            : entry_point = generate_CRC32C_updateBytes_entry(kind); break;
 444 #ifdef IA32
 445   // On x86_32 platforms, a special entry is generated for the following four methods.
 446   // On other platforms the normal entry is used to enter these methods.
 447   case Interpreter::java_lang_Float_intBitsToFloat
 448                                            : native = true; entry_point = generate_Float_intBitsToFloat_entry(); break;
 449   case Interpreter::java_lang_Float_floatToRawIntBits
 450                                            : native = true; entry_point = generate_Float_floatToRawIntBits_entry(); break;
 451   case Interpreter::java_lang_Double_longBitsToDouble
 452                                            : native = true; entry_point = generate_Double_longBitsToDouble_entry(); break;
 453   case Interpreter::java_lang_Double_doubleToRawLongBits
 454                                            : native = true; entry_point = generate_Double_doubleToRawLongBits_entry(); break;
 455 #else
 456   case Interpreter::java_lang_Float_intBitsToFloat:
 457   case Interpreter::java_lang_Float_floatToRawIntBits:
 458   case Interpreter::java_lang_Double_longBitsToDouble:
 459   case Interpreter::java_lang_Double_doubleToRawLongBits:
 460     native = true;
 461     break;
 462 #endif // !IA32















 463   default:
 464     fatal("unexpected method kind: %d", kind);
 465     break;
 466   }
 467 
 468   if (entry_point) {
 469     return entry_point;
 470   }
 471 
 472   // We expect the normal and native entry points to be generated first so we can reuse them.
 473   if (native) {
 474     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::native_synchronized : Interpreter::native);
 475     if (entry_point == NULL) {
 476       entry_point = generate_native_entry(synchronized);
 477     }
 478   } else {
 479     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::zerolocals_synchronized : Interpreter::zerolocals);
 480     if (entry_point == NULL) {
 481       entry_point = generate_normal_entry(synchronized);
 482     }
   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2015-2018, Azul Systems, Inc. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 211 
 212   AbstractInterpreter::initialize_method_handle_entries();
 213 
 214   // all native method kinds (must be one contiguous block)
 215   Interpreter::_native_entry_begin = Interpreter::code()->code_end();
 216   method_entry(native)
 217   method_entry(native_synchronized)
 218   Interpreter::_native_entry_end = Interpreter::code()->code_end();
 219 
 220   method_entry(java_util_zip_CRC32_update)
 221   method_entry(java_util_zip_CRC32_updateBytes)
 222   method_entry(java_util_zip_CRC32_updateByteBuffer)
 223   method_entry(java_util_zip_CRC32C_updateBytes)
 224   method_entry(java_util_zip_CRC32C_updateDirectByteBuffer)
 225 
 226   method_entry(java_lang_Float_intBitsToFloat);
 227   method_entry(java_lang_Float_floatToRawIntBits);
 228   method_entry(java_lang_Double_longBitsToDouble);
 229   method_entry(java_lang_Double_doubleToRawLongBits);
 230 
 231 #ifdef AARCH32
 232   if (UseAESIntrinsics) {
 233     method_entry(com_sun_crypto_provider_AESCrypt_encryptBlock)
 234     method_entry(com_sun_crypto_provider_AESCrypt_decryptBlock)
 235     if (StubRoutines::cipherBlockChaining_encryptAESCrypt_special()) {
 236       method_entry(com_sun_crypto_provider_CipherBlockChaining_encrypt)
 237     }
 238     if (StubRoutines::cipherBlockChaining_decryptAESCrypt_special()) {
 239       method_entry(com_sun_crypto_provider_CipherBlockChaining_decrypt)
 240     }
 241   }
 242 
 243   if (UseSHA1Intrinsics) {
 244     method_entry(sun_security_provider_SHA_implCompress)
 245   }
 246   if (UseSHA256Intrinsics) {
 247     method_entry(sun_security_provider_SHA2_implCompress)
 248   }
 249   if (UseSHA512Intrinsics) {
 250     method_entry(sun_security_provider_SHA5_implCompress)
 251   }
 252 #endif
 253 
 254 #undef method_entry
 255 
 256   // Bytecodes
 257   set_entry_points_for_all_bytes();
 258 
 259   // installation of code in other places in the runtime
 260   // (ExcutableCodeManager calls not needed to copy the entries)
 261   set_safepoints_for_all_bytes();
 262 
 263   { CodeletMark cm(_masm, "deoptimization entry points");
 264     Interpreter::_deopt_entry[0] = EntryPoint();
 265     Interpreter::_deopt_entry[0].set_entry(vtos, generate_deopt_entry_for(vtos, 0));
 266     for (int i = 1; i < Interpreter::number_of_deopt_entries; i++) {
 267       address deopt_itos = generate_deopt_entry_for(itos, i);
 268       Interpreter::_deopt_entry[i] =
 269         EntryPoint(
 270                    deopt_itos, /* btos */
 271                    deopt_itos, /* ztos */
 272                    deopt_itos, /* ctos */
 273                    deopt_itos, /* stos */


 467                                            : entry_point = generate_CRC32C_updateBytes_entry(kind); break;
 468 #ifdef IA32
 469   // On x86_32 platforms, a special entry is generated for the following four methods.
 470   // On other platforms the normal entry is used to enter these methods.
 471   case Interpreter::java_lang_Float_intBitsToFloat
 472                                            : native = true; entry_point = generate_Float_intBitsToFloat_entry(); break;
 473   case Interpreter::java_lang_Float_floatToRawIntBits
 474                                            : native = true; entry_point = generate_Float_floatToRawIntBits_entry(); break;
 475   case Interpreter::java_lang_Double_longBitsToDouble
 476                                            : native = true; entry_point = generate_Double_longBitsToDouble_entry(); break;
 477   case Interpreter::java_lang_Double_doubleToRawLongBits
 478                                            : native = true; entry_point = generate_Double_doubleToRawLongBits_entry(); break;
 479 #else
 480   case Interpreter::java_lang_Float_intBitsToFloat:
 481   case Interpreter::java_lang_Float_floatToRawIntBits:
 482   case Interpreter::java_lang_Double_longBitsToDouble:
 483   case Interpreter::java_lang_Double_doubleToRawLongBits:
 484     native = true;
 485     break;
 486 #endif // !IA32
 487 #ifdef AARCH32
 488   case Interpreter::com_sun_crypto_provider_AESCrypt_encryptBlock:
 489   case Interpreter::com_sun_crypto_provider_AESCrypt_decryptBlock:
 490     entry_point = generate_aescrypt_block_entry(kind);
 491     break;
 492   case Interpreter::com_sun_crypto_provider_CipherBlockChaining_encrypt:
 493   case Interpreter::com_sun_crypto_provider_CipherBlockChaining_decrypt:
 494     // don't use AES CBC intrinsic in interpreter
 495     break;
 496   case Interpreter::sun_security_provider_SHA_implCompress:
 497   case Interpreter::sun_security_provider_SHA2_implCompress:
 498   case Interpreter::sun_security_provider_SHA5_implCompress:
 499     entry_point = generate_SHA_implCompress_entry(kind);
 500     break;
 501 #endif
 502   default:
 503     fatal("unexpected method kind: %d", kind);
 504     break;
 505   }
 506 
 507   if (entry_point) {
 508     return entry_point;
 509   }
 510 
 511   // We expect the normal and native entry points to be generated first so we can reuse them.
 512   if (native) {
 513     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::native_synchronized : Interpreter::native);
 514     if (entry_point == NULL) {
 515       entry_point = generate_native_entry(synchronized);
 516     }
 517   } else {
 518     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::zerolocals_synchronized : Interpreter::zerolocals);
 519     if (entry_point == NULL) {
 520       entry_point = generate_normal_entry(synchronized);
 521     }
< prev index next >