< prev index next >

src/hotspot/share/interpreter/templateInterpreterGenerator.cpp

Print this page
rev 50307 : [mq]: cont


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

















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

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


 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 */


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












 434   case Interpreter::java_util_zip_CRC32_update
 435                                            : native = true; entry_point = generate_CRC32_update_entry();  break;
 436   case Interpreter::java_util_zip_CRC32_updateBytes
 437                                            : // fall thru
 438   case Interpreter::java_util_zip_CRC32_updateByteBuffer
 439                                            : native = true; entry_point = generate_CRC32_updateBytes_entry(kind); break;
 440   case Interpreter::java_util_zip_CRC32C_updateBytes
 441                                            : // fall thru
 442   case Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer
 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




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


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


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


< prev index next >