< prev index next >

src/hotspot/share/interpreter/templateInterpreterGenerator.cpp

Print this page




  86 
  87   { CodeletMark cm(_masm, "return entry points");
  88     const int index_size = sizeof(u2);
  89     Interpreter::_return_entry[0] = EntryPoint();
  90     for (int i = 1; i < Interpreter::number_of_return_entries; i++) {
  91       address return_itos = generate_return_entry_for(itos, i, index_size);
  92       Interpreter::_return_entry[i] =
  93         EntryPoint(
  94                    return_itos,
  95                    return_itos,
  96                    return_itos,
  97                    return_itos,
  98                    generate_return_entry_for(atos, i, index_size),
  99                    return_itos,
 100                    generate_return_entry_for(ltos, i, index_size),
 101                    generate_return_entry_for(ftos, i, index_size),
 102                    generate_return_entry_for(dtos, i, index_size),
 103                    generate_return_entry_for(vtos, i, index_size)
 104                    );
 105     }

















 106   }
 107 
 108   { CodeletMark cm(_masm, "invoke return entry points");
 109     // These states are in order specified in TosState, except btos/ztos/ctos/stos are
 110     // really the same as itos since there is no top of stack optimization for these types
 111     const TosState states[] = {itos, itos, itos, itos, itos, ltos, ftos, dtos, atos, vtos, ilgl};
 112     const int invoke_length = Bytecodes::length_for(Bytecodes::_invokestatic);
 113     const int invokeinterface_length = Bytecodes::length_for(Bytecodes::_invokeinterface);
 114     const int invokedynamic_length = Bytecodes::length_for(Bytecodes::_invokedynamic);
 115 
 116     for (int i = 0; i < Interpreter::number_of_return_addrs; i++) {
 117       TosState state = states[i];
 118       assert(state != ilgl, "states array is wrong above");
 119       Interpreter::_invoke_return_entry[i] = generate_return_entry_for(state, invoke_length, sizeof(u2));

 120       Interpreter::_invokeinterface_return_entry[i] = generate_return_entry_for(state, invokeinterface_length, sizeof(u2));
 121       Interpreter::_invokedynamic_return_entry[i] = generate_return_entry_for(state, invokedynamic_length, sizeof(u4));
 122     }
 123   }
 124 
 125   { CodeletMark cm(_masm, "earlyret entry points");
 126     Interpreter::_earlyret_entry =
 127       EntryPoint(
 128                  generate_earlyret_entry_for(btos),
 129                  generate_earlyret_entry_for(ztos),
 130                  generate_earlyret_entry_for(ctos),
 131                  generate_earlyret_entry_for(stos),
 132                  generate_earlyret_entry_for(atos),
 133                  generate_earlyret_entry_for(itos),
 134                  generate_earlyret_entry_for(ltos),
 135                  generate_earlyret_entry_for(ftos),
 136                  generate_earlyret_entry_for(dtos),
 137                  generate_earlyret_entry_for(vtos)
 138                  );
 139   }


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


 415   case Interpreter::zerolocals_synchronized:                synchronized = true;      break;
 416   case Interpreter::native                 : native = true;                           break;
 417   case Interpreter::native_synchronized    : native = true; synchronized = true;      break;
 418   case Interpreter::empty                  : break;
 419   case Interpreter::accessor               : break;
 420   case Interpreter::abstract               : entry_point = generate_abstract_entry(); break;
 421 
 422   case Interpreter::java_lang_math_sin     : // fall thru
 423   case Interpreter::java_lang_math_cos     : // fall thru
 424   case Interpreter::java_lang_math_tan     : // fall thru
 425   case Interpreter::java_lang_math_abs     : // fall thru
 426   case Interpreter::java_lang_math_log     : // fall thru
 427   case Interpreter::java_lang_math_log10   : // fall thru
 428   case Interpreter::java_lang_math_sqrt    : // fall thru
 429   case Interpreter::java_lang_math_pow     : // fall thru
 430   case Interpreter::java_lang_math_exp     : // fall thru
 431   case Interpreter::java_lang_math_fmaD    : // fall thru
 432   case Interpreter::java_lang_math_fmaF    : entry_point = generate_math_entry(kind);      break;
 433   case Interpreter::java_lang_ref_reference_get
 434                                            : entry_point = generate_Reference_get_entry(); break;














 435   case Interpreter::java_util_zip_CRC32_update
 436                                            : native = true; entry_point = generate_CRC32_update_entry();  break;
 437   case Interpreter::java_util_zip_CRC32_updateBytes
 438                                            : // fall thru
 439   case Interpreter::java_util_zip_CRC32_updateByteBuffer
 440                                            : native = true; entry_point = generate_CRC32_updateBytes_entry(kind); break;
 441   case Interpreter::java_util_zip_CRC32C_updateBytes
 442                                            : // fall thru
 443   case Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer
 444                                            : entry_point = generate_CRC32C_updateBytes_entry(kind); break;
 445 #ifdef IA32
 446   // On x86_32 platforms, a special entry is generated for the following four methods.
 447   // On other platforms the normal entry is used to enter these methods.
 448   case Interpreter::java_lang_Float_intBitsToFloat
 449                                            : native = true; entry_point = generate_Float_intBitsToFloat_entry(); break;
 450   case Interpreter::java_lang_Float_floatToRawIntBits
 451                                            : native = true; entry_point = generate_Float_floatToRawIntBits_entry(); break;
 452   case Interpreter::java_lang_Double_longBitsToDouble
 453                                            : native = true; entry_point = generate_Double_longBitsToDouble_entry(); break;
 454   case Interpreter::java_lang_Double_doubleToRawLongBits




  86 
  87   { CodeletMark cm(_masm, "return entry points");
  88     const int index_size = sizeof(u2);
  89     Interpreter::_return_entry[0] = EntryPoint();
  90     for (int i = 1; i < Interpreter::number_of_return_entries; i++) {
  91       address return_itos = generate_return_entry_for(itos, i, index_size);
  92       Interpreter::_return_entry[i] =
  93         EntryPoint(
  94                    return_itos,
  95                    return_itos,
  96                    return_itos,
  97                    return_itos,
  98                    generate_return_entry_for(atos, i, index_size),
  99                    return_itos,
 100                    generate_return_entry_for(ltos, i, index_size),
 101                    generate_return_entry_for(ftos, i, index_size),
 102                    generate_return_entry_for(dtos, i, index_size),
 103                    generate_return_entry_for(vtos, i, index_size)
 104                    );
 105     }
 106     Interpreter::_return_entryX[0] = EntryPoint();
 107     for (int i = 1; i < Interpreter::number_of_return_entries; i++) {
 108       address return_itos = generate_return_entry_for(itos, i, index_size, true);
 109       Interpreter::_return_entryX[i] =
 110         EntryPoint(
 111                    return_itos,
 112                    return_itos,
 113                    return_itos,
 114                    return_itos,
 115                    generate_return_entry_for(atos, i, index_size, true),
 116                    return_itos,
 117                    generate_return_entry_for(ltos, i, index_size, true),
 118                    generate_return_entry_for(ftos, i, index_size, true),
 119                    generate_return_entry_for(dtos, i, index_size, true),
 120                    generate_return_entry_for(vtos, i, index_size, true)
 121                    );
 122     }
 123   }
 124 
 125   { CodeletMark cm(_masm, "invoke return entry points");
 126     // These states are in order specified in TosState, except btos/ztos/ctos/stos are
 127     // really the same as itos since there is no top of stack optimization for these types
 128     const TosState states[] = {itos, itos, itos, itos, itos, ltos, ftos, dtos, atos, vtos, ilgl};
 129     const int invoke_length = Bytecodes::length_for(Bytecodes::_invokestatic);
 130     const int invokeinterface_length = Bytecodes::length_for(Bytecodes::_invokeinterface);
 131     const int invokedynamic_length = Bytecodes::length_for(Bytecodes::_invokedynamic);
 132 
 133     for (int i = 0; i < Interpreter::number_of_return_addrs; i++) {
 134       TosState state = states[i];
 135       assert(state != ilgl, "states array is wrong above");
 136       Interpreter::_invoke_return_entry[i] = generate_return_entry_for(state, invoke_length, sizeof(u2));
 137       Interpreter::_invoke_return_entryX[i] = generate_return_entry_for(state, invoke_length, sizeof(u2), true);
 138       Interpreter::_invokeinterface_return_entry[i] = generate_return_entry_for(state, invokeinterface_length, sizeof(u2));
 139       Interpreter::_invokedynamic_return_entry[i] = generate_return_entry_for(state, invokedynamic_length, sizeof(u4));
 140     }
 141   }
 142 
 143   { CodeletMark cm(_masm, "earlyret entry points");
 144     Interpreter::_earlyret_entry =
 145       EntryPoint(
 146                  generate_earlyret_entry_for(btos),
 147                  generate_earlyret_entry_for(ztos),
 148                  generate_earlyret_entry_for(ctos),
 149                  generate_earlyret_entry_for(stos),
 150                  generate_earlyret_entry_for(atos),
 151                  generate_earlyret_entry_for(itos),
 152                  generate_earlyret_entry_for(ltos),
 153                  generate_earlyret_entry_for(ftos),
 154                  generate_earlyret_entry_for(dtos),
 155                  generate_earlyret_entry_for(vtos)
 156                  );
 157   }


 229 
 230   AbstractInterpreter::initialize_method_handle_entries();
 231 
 232   // all native method kinds (must be one contiguous block)
 233   Interpreter::_native_entry_begin = Interpreter::code()->code_end();
 234   method_entry(native)
 235   method_entry(native_synchronized)
 236   Interpreter::_native_entry_end = Interpreter::code()->code_end();
 237 
 238   method_entry(java_util_zip_CRC32_update)
 239   method_entry(java_util_zip_CRC32_updateBytes)
 240   method_entry(java_util_zip_CRC32_updateByteBuffer)
 241   method_entry(java_util_zip_CRC32C_updateBytes)
 242   method_entry(java_util_zip_CRC32C_updateDirectByteBuffer)
 243 
 244   method_entry(java_lang_Float_intBitsToFloat);
 245   method_entry(java_lang_Float_floatToRawIntBits);
 246   method_entry(java_lang_Double_longBitsToDouble);
 247   method_entry(java_lang_Double_doubleToRawLongBits);
 248 
 249   method_entry(java_lang_continuation_getSP)
 250   method_entry(java_lang_continuation_getFP)
 251   method_entry(java_lang_continuation_getPC)
 252   method_entry(java_lang_continuation_doContinue)
 253   method_entry(java_lang_continuation_doYield)
 254   method_entry(java_lang_continuation_jump)
 255   method_entry(java_lang_continuation_runLevel)
 256 
 257 #undef method_entry
 258 
 259   // Bytecodes
 260   set_entry_points_for_all_bytes();
 261 
 262   // installation of code in other places in the runtime
 263   // (ExcutableCodeManager calls not needed to copy the entries)
 264   set_safepoints_for_all_bytes();
 265 
 266   { CodeletMark cm(_masm, "deoptimization entry points");
 267     Interpreter::_deopt_entry[0] = EntryPoint();
 268     Interpreter::_deopt_entry[0].set_entry(vtos, generate_deopt_entry_for(vtos, 0));
 269     for (int i = 1; i < Interpreter::number_of_deopt_entries; i++) {
 270       address deopt_itos = generate_deopt_entry_for(itos, i);
 271       Interpreter::_deopt_entry[i] =
 272         EntryPoint(
 273                    deopt_itos, /* btos */
 274                    deopt_itos, /* ztos */
 275                    deopt_itos, /* ctos */
 276                    deopt_itos, /* stos */


 441   case Interpreter::zerolocals_synchronized:                synchronized = true;      break;
 442   case Interpreter::native                 : native = true;                           break;
 443   case Interpreter::native_synchronized    : native = true; synchronized = true;      break;
 444   case Interpreter::empty                  : break;
 445   case Interpreter::accessor               : break;
 446   case Interpreter::abstract               : entry_point = generate_abstract_entry(); break;
 447 
 448   case Interpreter::java_lang_math_sin     : // fall thru
 449   case Interpreter::java_lang_math_cos     : // fall thru
 450   case Interpreter::java_lang_math_tan     : // fall thru
 451   case Interpreter::java_lang_math_abs     : // fall thru
 452   case Interpreter::java_lang_math_log     : // fall thru
 453   case Interpreter::java_lang_math_log10   : // fall thru
 454   case Interpreter::java_lang_math_sqrt    : // fall thru
 455   case Interpreter::java_lang_math_pow     : // fall thru
 456   case Interpreter::java_lang_math_exp     : // fall thru
 457   case Interpreter::java_lang_math_fmaD    : // fall thru
 458   case Interpreter::java_lang_math_fmaF    : entry_point = generate_math_entry(kind);      break;
 459   case Interpreter::java_lang_ref_reference_get
 460                                            : entry_point = generate_Reference_get_entry(); break;
 461   case Interpreter::java_lang_continuation_getSP
 462                                            : entry_point = generate_Continuation_getSP_entry(); break;
 463   case Interpreter::java_lang_continuation_getFP
 464                                            : entry_point = generate_Continuation_getFP_entry(); break;
 465   case Interpreter::java_lang_continuation_getPC
 466                                            : entry_point = generate_Continuation_getPC_entry(); break;
 467   case Interpreter::java_lang_continuation_doContinue
 468                                            : entry_point = generate_Continuation_doContinue_entry(); break;
 469   case Interpreter::java_lang_continuation_doYield
 470                                            : entry_point = generate_Continuation_doYield_entry(); break;
 471   case Interpreter::java_lang_continuation_jump
 472                                            : entry_point = generate_Continuation_jump_entry(); break;
 473   case Interpreter::java_lang_continuation_runLevel
 474                                            : entry_point = generate_Continuation_runLevel_entry(); break;
 475   case Interpreter::java_util_zip_CRC32_update
 476                                            : native = true; entry_point = generate_CRC32_update_entry();  break;
 477   case Interpreter::java_util_zip_CRC32_updateBytes
 478                                            : // fall thru
 479   case Interpreter::java_util_zip_CRC32_updateByteBuffer
 480                                            : native = true; entry_point = generate_CRC32_updateBytes_entry(kind); break;
 481   case Interpreter::java_util_zip_CRC32C_updateBytes
 482                                            : // fall thru
 483   case Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer
 484                                            : entry_point = generate_CRC32C_updateBytes_entry(kind); break;
 485 #ifdef IA32
 486   // On x86_32 platforms, a special entry is generated for the following four methods.
 487   // On other platforms the normal entry is used to enter these methods.
 488   case Interpreter::java_lang_Float_intBitsToFloat
 489                                            : native = true; entry_point = generate_Float_intBitsToFloat_entry(); break;
 490   case Interpreter::java_lang_Float_floatToRawIntBits
 491                                            : native = true; entry_point = generate_Float_floatToRawIntBits_entry(); break;
 492   case Interpreter::java_lang_Double_longBitsToDouble
 493                                            : native = true; entry_point = generate_Double_longBitsToDouble_entry(); break;
 494   case Interpreter::java_lang_Double_doubleToRawLongBits


< prev index next >