1 /* 2 * Copyright (c) 1997, 2024, 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 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "compiler/disassembler.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "interpreter/interpreterRuntime.hpp" 29 #include "interpreter/interp_masm.hpp" 30 #include "interpreter/templateInterpreter.hpp" 31 #include "interpreter/templateInterpreterGenerator.hpp" 32 #include "interpreter/templateTable.hpp" 33 #include "oops/methodData.hpp" 34 35 #define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)-> 36 37 TemplateInterpreterGenerator::TemplateInterpreterGenerator(): AbstractInterpreterGenerator() { 38 _unimplemented_bytecode = nullptr; 39 _illegal_bytecode_sequence = nullptr; 40 generate_all(); 41 } 42 43 static const BasicType types[Interpreter::number_of_result_handlers] = { 44 T_BOOLEAN, 45 T_CHAR , 46 T_BYTE , 47 T_SHORT , 48 T_INT , 49 T_LONG , 50 T_VOID , 51 T_FLOAT , 52 T_DOUBLE , 53 T_OBJECT 54 }; 55 56 void TemplateInterpreterGenerator::generate_all() { 57 { CodeletMark cm(_masm, "slow signature handler"); 58 AbstractInterpreter::_slow_signature_handler = generate_slow_signature_handler(); 59 } 60 61 { CodeletMark cm(_masm, "error exits"); 62 _unimplemented_bytecode = generate_error_exit("unimplemented bytecode"); 63 _illegal_bytecode_sequence = generate_error_exit("illegal bytecode sequence - method not verified"); 64 } 65 66 #ifndef PRODUCT 67 if (TraceBytecodes) { 68 CodeletMark cm(_masm, "bytecode tracing support"); 69 Interpreter::_trace_code = 70 EntryPoint( 71 generate_trace_code(atos), 72 generate_trace_code(itos), 73 generate_trace_code(ltos), 74 generate_trace_code(ftos), 75 generate_trace_code(dtos), 76 generate_trace_code(vtos) 77 ); 78 } 79 #endif // !PRODUCT 80 81 { CodeletMark cm(_masm, "return entry points"); 82 Interpreter::_return_entry[0] = EntryPoint(); 83 for (int i = 1; i < Interpreter::number_of_return_entries; i++) { 84 Interpreter::_return_entry[i] = 85 EntryPoint( 86 generate_return_entry_for(atos, i, sizeof(u2)), 87 generate_return_entry_for(itos, i, sizeof(u2)), 88 generate_return_entry_for(ltos, i, sizeof(u2)), 89 generate_return_entry_for(ftos, i, sizeof(u2)), 90 generate_return_entry_for(dtos, i, sizeof(u2)), 91 generate_return_entry_for(vtos, i, sizeof(u2)) 92 ); 93 } 94 } 95 96 { CodeletMark cm(_masm, "invoke return entry points"); 97 // These states are in order specified in TosState, except btos/ztos/ctos/stos which 98 // are the same as itos since there is no top of stack optimization for these types 99 const TosState states[] = {ilgl, ilgl, ilgl, ilgl, itos, ltos, ftos, dtos, atos, vtos, ilgl}; 100 const int invoke_length = Bytecodes::length_for(Bytecodes::_invokestatic); 101 const int invokeinterface_length = Bytecodes::length_for(Bytecodes::_invokeinterface); 102 const int invokedynamic_length = Bytecodes::length_for(Bytecodes::_invokedynamic); 103 104 assert(invoke_length >= 0 && invoke_length < Interpreter::number_of_return_entries, "invariant"); 105 assert(invokeinterface_length >= 0 && invokeinterface_length < Interpreter::number_of_return_entries, "invariant"); 106 107 for (int i = itos; i < Interpreter::number_of_return_addrs; i++) { 108 TosState state = states[i]; 109 assert(state != ilgl, "states array is wrong above"); 110 111 // Reuse generated entry points 112 Interpreter::_invoke_return_entry[i] = Interpreter::_return_entry[invoke_length].entry(state); 113 Interpreter::_invokeinterface_return_entry[i] = Interpreter::_return_entry[invokeinterface_length].entry(state); 114 115 Interpreter::_invokedynamic_return_entry[i] = generate_return_entry_for(state, invokedynamic_length, sizeof(u4)); 116 } 117 118 // set itos entry points for btos/ztos/ctos/stos 119 for (int i = 0; i < itos; i++) { 120 Interpreter::_invoke_return_entry[i] = Interpreter::_invoke_return_entry[itos]; 121 Interpreter::_invokeinterface_return_entry[i] = Interpreter::_invokeinterface_return_entry[itos]; 122 Interpreter::_invokedynamic_return_entry[i] = Interpreter::_invokedynamic_return_entry[itos]; 123 } 124 } 125 126 { CodeletMark cm(_masm, "earlyret entry points"); 127 Interpreter::_earlyret_entry = 128 EntryPoint( 129 generate_earlyret_entry_for(atos), 130 generate_earlyret_entry_for(itos), 131 generate_earlyret_entry_for(ltos), 132 generate_earlyret_entry_for(ftos), 133 generate_earlyret_entry_for(dtos), 134 generate_earlyret_entry_for(vtos) 135 ); 136 } 137 138 { CodeletMark cm(_masm, "result handlers for native calls"); 139 // The various result converter stublets. 140 int is_generated[Interpreter::number_of_result_handlers]; 141 memset(is_generated, 0, sizeof(is_generated)); 142 143 for (int i = 0; i < Interpreter::number_of_result_handlers; i++) { 144 BasicType type = types[i]; 145 if (!is_generated[Interpreter::BasicType_as_index(type)]++) { 146 Interpreter::_native_abi_to_tosca[Interpreter::BasicType_as_index(type)] = generate_result_handler_for(type); 147 } 148 } 149 } 150 151 152 { CodeletMark cm(_masm, "safepoint entry points"); 153 Interpreter::_safept_entry = 154 EntryPoint( 155 generate_safept_entry_for(atos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)), 156 generate_safept_entry_for(itos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)), 157 generate_safept_entry_for(ltos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)), 158 generate_safept_entry_for(ftos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)), 159 generate_safept_entry_for(dtos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)), 160 generate_safept_entry_for(vtos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)) 161 ); 162 } 163 164 { CodeletMark cm(_masm, "exception handling"); 165 // (Note: this is not safepoint safe because thread may return to compiled code) 166 generate_throw_exception(); 167 } 168 169 { CodeletMark cm(_masm, "throw exception entrypoints"); 170 Interpreter::_throw_ArrayIndexOutOfBoundsException_entry = generate_ArrayIndexOutOfBounds_handler(); 171 Interpreter::_throw_ArrayStoreException_entry = generate_klass_exception_handler("java/lang/ArrayStoreException"); 172 Interpreter::_throw_ArithmeticException_entry = generate_exception_handler("java/lang/ArithmeticException", "/ by zero"); 173 Interpreter::_throw_ClassCastException_entry = generate_ClassCastException_handler(); 174 Interpreter::_throw_NullPointerException_entry = generate_exception_handler("java/lang/NullPointerException", nullptr); 175 Interpreter::_throw_StackOverflowError_entry = generate_StackOverflowError_handler(); 176 } 177 178 { CodeletMark cm(_masm, "preemption resume adapter"); 179 Interpreter::_cont_resume_interpreter_adapter = generate_cont_resume_interpreter_adapter(); 180 } 181 182 #define method_entry(kind) \ 183 { CodeletMark cm(_masm, "method entry point (kind = " #kind ")"); \ 184 Interpreter::_entry_table[Interpreter::kind] = generate_method_entry(Interpreter::kind, false); \ 185 } 186 187 // all non-native method kinds 188 method_entry(zerolocals) 189 method_entry(zerolocals_synchronized) 190 method_entry(zerolocals_upcalls) 191 method_entry(zerolocals_synchronized_upcalls) 192 method_entry(empty) 193 method_entry(empty_upcalls) 194 method_entry(getter) 195 method_entry(setter) 196 method_entry(abstract) 197 method_entry(java_lang_math_sin ) 198 method_entry(java_lang_math_cos ) 199 method_entry(java_lang_math_tan ) 200 method_entry(java_lang_math_tanh ) 201 method_entry(java_lang_math_abs ) 202 method_entry(java_lang_math_sqrt ) 203 method_entry(java_lang_math_sqrt_strict) 204 method_entry(java_lang_math_log ) 205 method_entry(java_lang_math_log10) 206 method_entry(java_lang_math_exp ) 207 method_entry(java_lang_math_pow ) 208 method_entry(java_lang_math_fmaF ) 209 method_entry(java_lang_math_fmaD ) 210 method_entry(java_lang_ref_reference_get) 211 AbstractInterpreter::initialize_method_handle_entries(); 212 213 method_entry(java_util_zip_CRC32C_updateBytes) 214 method_entry(java_util_zip_CRC32C_updateDirectByteBuffer) 215 216 method_entry(java_lang_Float_float16ToFloat); 217 method_entry(java_lang_Float_floatToFloat16); 218 219 #undef method_entry 220 221 // all native method kinds 222 #define native_method_entry(kind) \ 223 { CodeletMark cm(_masm, "native method entry point (kind = " #kind ")"); \ 224 Interpreter::_entry_table[Interpreter::kind] = generate_method_entry(Interpreter::kind, true); \ 225 } 226 227 native_method_entry(native) 228 native_method_entry(native_synchronized) 229 native_method_entry(native_upcalls) 230 native_method_entry(native_synchronized_upcalls) 231 232 // Entries to intrinsics for native methods should follow 233 // entries for `native` methods to use the same address in case 234 // intrinsic is disabled. 235 native_method_entry(java_lang_Thread_currentThread) 236 237 native_method_entry(java_util_zip_CRC32_update) 238 native_method_entry(java_util_zip_CRC32_updateBytes) 239 native_method_entry(java_util_zip_CRC32_updateByteBuffer) 240 241 native_method_entry(java_lang_Float_intBitsToFloat) 242 native_method_entry(java_lang_Float_floatToRawIntBits) 243 native_method_entry(java_lang_Double_longBitsToDouble) 244 native_method_entry(java_lang_Double_doubleToRawLongBits) 245 246 #undef native_method_entry 247 248 // Bytecodes 249 set_entry_points_for_all_bytes(); 250 251 // installation of code in other places in the runtime 252 // (ExcutableCodeManager calls not needed to copy the entries) 253 set_safepoints_for_all_bytes(); 254 255 { CodeletMark cm(_masm, "deoptimization entry points"); 256 Interpreter::_deopt_entry[0] = EntryPoint(); 257 Interpreter::_deopt_entry[0].set_entry(vtos, generate_deopt_entry_for(vtos, 0)); 258 for (int i = 1; i < Interpreter::number_of_deopt_entries; i++) { 259 Interpreter::_deopt_entry[i] = 260 EntryPoint( 261 generate_deopt_entry_for(atos, i), 262 generate_deopt_entry_for(itos, i), 263 generate_deopt_entry_for(ltos, i), 264 generate_deopt_entry_for(ftos, i), 265 generate_deopt_entry_for(dtos, i), 266 generate_deopt_entry_for(vtos, i) 267 ); 268 } 269 address return_continuation = Interpreter::_normal_table.entry(Bytecodes::_return).entry(vtos); 270 vmassert(return_continuation != nullptr, "return entry not generated yet"); 271 Interpreter::_deopt_reexecute_return_entry = generate_deopt_entry_for(vtos, 0, return_continuation); 272 } 273 274 } 275 276 //------------------------------------------------------------------------------------------------------------------------ 277 278 address TemplateInterpreterGenerator::generate_error_exit(const char* msg) { 279 address entry = __ pc(); 280 __ stop(msg); 281 return entry; 282 } 283 284 285 //------------------------------------------------------------------------------------------------------------------------ 286 287 void TemplateInterpreterGenerator::set_entry_points_for_all_bytes() { 288 for (int i = 0; i < DispatchTable::length; i++) { 289 Bytecodes::Code code = (Bytecodes::Code)i; 290 if (Bytecodes::is_defined(code)) { 291 set_entry_points(code); 292 } else { 293 set_unimplemented(i); 294 } 295 } 296 } 297 298 299 void TemplateInterpreterGenerator::set_safepoints_for_all_bytes() { 300 for (int i = 0; i < DispatchTable::length; i++) { 301 Bytecodes::Code code = (Bytecodes::Code)i; 302 if (Bytecodes::is_defined(code)) Interpreter::_safept_table.set_entry(code, Interpreter::_safept_entry); 303 } 304 } 305 306 307 void TemplateInterpreterGenerator::set_unimplemented(int i) { 308 address e = _unimplemented_bytecode; 309 EntryPoint entry(e, e, e, e, e, e, e, e, e, e); 310 Interpreter::_normal_table.set_entry(i, entry); 311 Interpreter::_wentry_point[i] = _unimplemented_bytecode; 312 } 313 314 315 void TemplateInterpreterGenerator::set_entry_points(Bytecodes::Code code) { 316 CodeletMark cm(_masm, Bytecodes::name(code), code); 317 // initialize entry points 318 assert(_unimplemented_bytecode != nullptr, "should have been generated before"); 319 assert(_illegal_bytecode_sequence != nullptr, "should have been generated before"); 320 address bep = _illegal_bytecode_sequence; 321 address zep = _illegal_bytecode_sequence; 322 address cep = _illegal_bytecode_sequence; 323 address sep = _illegal_bytecode_sequence; 324 address aep = _illegal_bytecode_sequence; 325 address iep = _illegal_bytecode_sequence; 326 address lep = _illegal_bytecode_sequence; 327 address fep = _illegal_bytecode_sequence; 328 address dep = _illegal_bytecode_sequence; 329 address vep = _unimplemented_bytecode; 330 address wep = _unimplemented_bytecode; 331 // code for short & wide version of bytecode 332 if (Bytecodes::is_defined(code)) { 333 Template* t = TemplateTable::template_for(code); 334 assert(t->is_valid(), "just checking"); 335 set_short_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep); 336 } 337 if (Bytecodes::wide_is_defined(code)) { 338 Template* t = TemplateTable::template_for_wide(code); 339 assert(t->is_valid(), "just checking"); 340 set_wide_entry_point(t, wep); 341 } 342 // set entry points 343 EntryPoint entry(bep, zep, cep, sep, aep, iep, lep, fep, dep, vep); 344 Interpreter::_normal_table.set_entry(code, entry); 345 Interpreter::_wentry_point[code] = wep; 346 } 347 348 349 void TemplateInterpreterGenerator::set_wide_entry_point(Template* t, address& wep) { 350 assert(t->is_valid(), "template must exist"); 351 assert(t->tos_in() == vtos, "only vtos tos_in supported for wide instructions"); 352 wep = __ pc(); generate_and_dispatch(t); 353 } 354 355 356 void TemplateInterpreterGenerator::set_short_entry_points(Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep) { 357 assert(t->is_valid(), "template must exist"); 358 switch (t->tos_in()) { 359 case btos: 360 case ztos: 361 case ctos: 362 case stos: 363 ShouldNotReachHere(); // btos/ctos/stos should use itos. 364 break; 365 case atos: vep = __ pc(); __ pop(atos); aep = __ pc(); generate_and_dispatch(t); break; 366 case itos: vep = __ pc(); __ pop(itos); iep = __ pc(); generate_and_dispatch(t); break; 367 case ltos: vep = __ pc(); __ pop(ltos); lep = __ pc(); generate_and_dispatch(t); break; 368 case ftos: vep = __ pc(); __ pop(ftos); fep = __ pc(); generate_and_dispatch(t); break; 369 case dtos: vep = __ pc(); __ pop(dtos); dep = __ pc(); generate_and_dispatch(t); break; 370 case vtos: set_vtos_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep); break; 371 default : ShouldNotReachHere(); break; 372 } 373 } 374 375 376 //------------------------------------------------------------------------------------------------------------------------ 377 378 void TemplateInterpreterGenerator::generate_and_dispatch(Template* t, TosState tos_out) { 379 if (CountBytecodes || CountBytecodesPerThread || TraceBytecodes || StopInterpreterAt > 0) { 380 count_bytecode(); 381 } 382 if (PrintBytecodeHistogram) histogram_bytecode(t); 383 #ifndef PRODUCT 384 // debugging code 385 if (PrintBytecodePairHistogram) histogram_bytecode_pair(t); 386 if (TraceBytecodes) trace_bytecode(t); 387 if (StopInterpreterAt > 0) stop_interpreter_at(); 388 __ verify_FPU(1, t->tos_in()); 389 #endif // !PRODUCT 390 int step = 0; 391 if (!t->does_dispatch()) { 392 step = t->is_wide() ? Bytecodes::wide_length_for(t->bytecode()) : Bytecodes::length_for(t->bytecode()); 393 if (tos_out == ilgl) tos_out = t->tos_out(); 394 // compute bytecode size 395 assert(step > 0, "just checkin'"); 396 // setup stuff for dispatching next bytecode 397 if (ProfileInterpreter && VerifyDataPointer 398 && MethodData::bytecode_has_profile(t->bytecode())) { 399 __ verify_method_data_pointer(); 400 } 401 __ dispatch_prolog(tos_out, step); 402 } 403 // generate template 404 t->generate(_masm); 405 // advance 406 if (t->does_dispatch()) { 407 #ifdef ASSERT 408 // make sure execution doesn't go beyond this point if code is broken 409 __ should_not_reach_here(); 410 #endif // ASSERT 411 } else { 412 // dispatch to next bytecode 413 __ dispatch_epilog(tos_out, step); 414 } 415 } 416 417 bool TemplateInterpreterGenerator::is_synchronized_method(AbstractInterpreter::MethodKind kind) { 418 switch (kind) { 419 case Interpreter::zerolocals_synchronized : // fall thru 420 case Interpreter::zerolocals_synchronized_upcalls: // fall thru 421 case Interpreter::native_synchronized : // fall thru 422 case Interpreter::native_synchronized_upcalls : 423 return true; 424 default: 425 return false; 426 } 427 } 428 429 bool TemplateInterpreterGenerator::is_runtime_upcalls_method(AbstractInterpreter::MethodKind kind) { 430 switch (kind) { 431 case Interpreter::zerolocals_upcalls : // fall thru 432 case Interpreter::zerolocals_synchronized_upcalls: // fall thru 433 case Interpreter::native_upcalls : // fall thru 434 case Interpreter::native_synchronized_upcalls : // fall thru 435 case Interpreter::empty_upcalls : 436 return true; 437 default: 438 return false; 439 } 440 } 441 442 bool TemplateInterpreterGenerator::is_intrinsic_method(AbstractInterpreter::MethodKind kind) { 443 switch (kind) { 444 case Interpreter::zerolocals : // fall thru 445 case Interpreter::zerolocals_synchronized : // fall thru 446 case Interpreter::zerolocals_upcalls : // fall thru 447 case Interpreter::zerolocals_synchronized_upcalls: // fall thru 448 case Interpreter::native : // fall thru 449 case Interpreter::native_synchronized : // fall thru 450 case Interpreter::native_upcalls : // fall thru 451 case Interpreter::native_synchronized_upcalls : // fall thru 452 case Interpreter::empty : // fall thru 453 case Interpreter::empty_upcalls : // fall thru 454 case Interpreter::getter : // fall thru 455 case Interpreter::setter : // fall thru 456 case Interpreter::abstract : 457 return false; 458 default: 459 return true; 460 } 461 } 462 463 bool TemplateInterpreterGenerator::is_abstract_method(AbstractInterpreter::MethodKind kind) { 464 switch (kind) { 465 case Interpreter::abstract: 466 return true; 467 default: 468 return false; 469 } 470 } 471 472 // Generate method entries 473 address TemplateInterpreterGenerator::generate_method_entry( 474 AbstractInterpreter::MethodKind kind, bool native) { 475 address entry_point = nullptr; 476 477 if (is_abstract_method(kind)) { 478 entry_point = generate_abstract_entry(); 479 } else if (is_intrinsic_method(kind)) { 480 entry_point = generate_intrinsic_entry(kind); 481 } 482 483 if (entry_point) { 484 return entry_point; 485 } 486 487 bool synchronized = is_synchronized_method(kind); 488 bool upcalls = is_runtime_upcalls_method(kind); 489 490 // We expect the normal and native entry points to be generated first so we can reuse them. 491 if (!synchronized && !upcalls) { 492 entry_point = Interpreter::entry_for_kind(native ? Interpreter::native 493 : Interpreter::zerolocals); 494 } else if (synchronized && !upcalls) { 495 entry_point = Interpreter::entry_for_kind(native ? Interpreter::native_synchronized 496 : Interpreter::zerolocals_synchronized); 497 } else if (!synchronized && upcalls) { 498 entry_point = Interpreter::entry_for_kind(native ? Interpreter::native_upcalls 499 : Interpreter::zerolocals_upcalls); 500 } else if (synchronized && upcalls) { 501 entry_point = Interpreter::entry_for_kind(native ? Interpreter::native_synchronized_upcalls 502 : Interpreter::zerolocals_synchronized_upcalls); 503 } 504 505 if (entry_point == nullptr) { 506 entry_point = native ? generate_native_entry(synchronized, upcalls) 507 : generate_normal_entry(synchronized, upcalls); 508 } 509 510 return entry_point; 511 } 512 513 // Generate intrinsic method entries 514 address TemplateInterpreterGenerator::generate_intrinsic_entry(AbstractInterpreter::MethodKind kind) { 515 if (!InlineIntrinsics || !vmIntrinsics::is_intrinsic_available(AbstractInterpreter::method_intrinsic(kind))) { 516 return nullptr; 517 } 518 519 address entry_point = nullptr; 520 521 switch (kind) { 522 case Interpreter::java_lang_math_sin : // fall thru 523 case Interpreter::java_lang_math_cos : // fall thru 524 case Interpreter::java_lang_math_tan : // fall thru 525 case Interpreter::java_lang_math_tanh : // fall thru 526 case Interpreter::java_lang_math_abs : // fall thru 527 case Interpreter::java_lang_math_log : // fall thru 528 case Interpreter::java_lang_math_log10 : // fall thru 529 case Interpreter::java_lang_math_sqrt : // fall thru 530 case Interpreter::java_lang_math_pow : // fall thru 531 case Interpreter::java_lang_math_exp : // fall thru 532 case Interpreter::java_lang_math_fmaD : // fall thru 533 case Interpreter::java_lang_math_fmaF : entry_point = generate_math_entry(kind); break; 534 case Interpreter::java_lang_math_sqrt_strict 535 : entry_point = generate_math_entry(Interpreter::java_lang_math_sqrt); break; 536 case Interpreter::java_lang_ref_reference_get 537 : entry_point = generate_Reference_get_entry(); break; 538 case Interpreter::java_util_zip_CRC32_update 539 : entry_point = generate_CRC32_update_entry(); break; 540 case Interpreter::java_util_zip_CRC32_updateBytes 541 : // fall thru 542 case Interpreter::java_util_zip_CRC32_updateByteBuffer 543 : entry_point = generate_CRC32_updateBytes_entry(kind); break; 544 case Interpreter::java_util_zip_CRC32C_updateBytes 545 : // fall thru 546 case Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer 547 : entry_point = generate_CRC32C_updateBytes_entry(kind); break; 548 case Interpreter::java_lang_Thread_currentThread 549 : entry_point = generate_currentThread(); break; 550 case Interpreter::java_lang_Float_float16ToFloat 551 : entry_point = generate_Float_float16ToFloat_entry(); break; 552 case Interpreter::java_lang_Float_floatToFloat16 553 : entry_point = generate_Float_floatToFloat16_entry(); break; 554 555 // On x86_32 platforms, a special entry is generated for the following four methods. 556 // On other platforms the native entry is used to enter these methods. 557 case Interpreter::java_lang_Float_intBitsToFloat 558 : entry_point = generate_Float_intBitsToFloat_entry(); break; 559 case Interpreter::java_lang_Float_floatToRawIntBits 560 : entry_point = generate_Float_floatToRawIntBits_entry(); break; 561 case Interpreter::java_lang_Double_longBitsToDouble 562 : entry_point = generate_Double_longBitsToDouble_entry(); break; 563 case Interpreter::java_lang_Double_doubleToRawLongBits 564 : entry_point = generate_Double_doubleToRawLongBits_entry(); break; 565 default: 566 fatal("unexpected intrinsic method kind: %d", kind); 567 break; 568 } 569 return entry_point; 570 } 571