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  *
  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 #ifndef CC_INTERP
  36 
  37 #define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
  38 
  39 TemplateInterpreterGenerator::TemplateInterpreterGenerator(StubQueue* _code): AbstractInterpreterGenerator(_code) {
  40   _unimplemented_bytecode    = NULL;
  41   _illegal_bytecode_sequence = NULL;
  42   generate_all();
  43 }
  44 
  45 static const BasicType types[Interpreter::number_of_result_handlers] = {
  46   T_BOOLEAN,
  47   T_CHAR   ,
  48   T_BYTE   ,
  49   T_SHORT  ,
  50   T_INT    ,
  51   T_LONG   ,
  52   T_VOID   ,
  53   T_FLOAT  ,
  54   T_DOUBLE ,
  55   T_OBJECT
  56 };
  57 
  58 void TemplateInterpreterGenerator::generate_all() {
  59   { CodeletMark cm(_masm, "slow signature handler");
  60     AbstractInterpreter::_slow_signature_handler = generate_slow_signature_handler();
  61   }
  62 
  63   { CodeletMark cm(_masm, "error exits");
  64     _unimplemented_bytecode    = generate_error_exit("unimplemented bytecode");
  65     _illegal_bytecode_sequence = generate_error_exit("illegal bytecode sequence - method not verified");
  66   }
  67 
  68 #ifndef PRODUCT
  69   if (TraceBytecodes) {
  70     CodeletMark cm(_masm, "bytecode tracing support");
  71     Interpreter::_trace_code =
  72       EntryPoint(
  73                  generate_trace_code(btos),
  74                  generate_trace_code(ztos),
  75                  generate_trace_code(ctos),
  76                  generate_trace_code(stos),
  77                  generate_trace_code(atos),
  78                  generate_trace_code(itos),
  79                  generate_trace_code(ltos),
  80                  generate_trace_code(ftos),
  81                  generate_trace_code(dtos),
  82                  generate_trace_code(vtos)
  83                  );
  84   }
  85 #endif // !PRODUCT
  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   }
 158 
 159   { CodeletMark cm(_masm, "result handlers for native calls");
 160     // The various result converter stublets.
 161     int is_generated[Interpreter::number_of_result_handlers];
 162     memset(is_generated, 0, sizeof(is_generated));
 163 
 164     for (int i = 0; i < Interpreter::number_of_result_handlers; i++) {
 165       BasicType type = types[i];
 166       if (!is_generated[Interpreter::BasicType_as_index(type)]++) {
 167         Interpreter::_native_abi_to_tosca[Interpreter::BasicType_as_index(type)] = generate_result_handler_for(type);
 168       }
 169     }
 170   }
 171 
 172 
 173   { CodeletMark cm(_masm, "safepoint entry points");
 174     Interpreter::_safept_entry =
 175       EntryPoint(
 176                  generate_safept_entry_for(btos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 177                  generate_safept_entry_for(ztos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 178                  generate_safept_entry_for(ctos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 179                  generate_safept_entry_for(stos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 180                  generate_safept_entry_for(atos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 181                  generate_safept_entry_for(itos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 182                  generate_safept_entry_for(ltos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 183                  generate_safept_entry_for(ftos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 184                  generate_safept_entry_for(dtos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint)),
 185                  generate_safept_entry_for(vtos, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_safepoint))
 186                  );
 187   }
 188 
 189   { CodeletMark cm(_masm, "exception handling");
 190     // (Note: this is not safepoint safe because thread may return to compiled code)
 191     generate_throw_exception();
 192   }
 193 
 194   { CodeletMark cm(_masm, "throw exception entrypoints");
 195     Interpreter::_throw_ArrayIndexOutOfBoundsException_entry = generate_ArrayIndexOutOfBounds_handler();
 196     Interpreter::_throw_ArrayStoreException_entry            = generate_klass_exception_handler("java/lang/ArrayStoreException");
 197     Interpreter::_throw_ArithmeticException_entry            = generate_exception_handler("java/lang/ArithmeticException", "/ by zero");
 198     Interpreter::_throw_ClassCastException_entry             = generate_ClassCastException_handler();
 199     Interpreter::_throw_NullPointerException_entry           = generate_exception_handler("java/lang/NullPointerException", NULL);
 200     Interpreter::_throw_StackOverflowError_entry             = generate_StackOverflowError_handler();
 201   }
 202 
 203 
 204 
 205 #define method_entry(kind)                                              \
 206   { CodeletMark cm(_masm, "method entry point (kind = " #kind ")"); \
 207     Interpreter::_entry_table[Interpreter::kind] = generate_method_entry(Interpreter::kind); \
 208     Interpreter::update_cds_entry_table(Interpreter::kind); \
 209   }
 210 
 211   // all non-native method kinds
 212   method_entry(zerolocals)
 213   method_entry(zerolocals_synchronized)
 214   method_entry(empty)
 215   method_entry(accessor)
 216   method_entry(abstract)
 217   method_entry(java_lang_math_sin  )
 218   method_entry(java_lang_math_cos  )
 219   method_entry(java_lang_math_tan  )
 220   method_entry(java_lang_math_abs  )
 221   method_entry(java_lang_math_sqrt )
 222   method_entry(java_lang_math_log  )
 223   method_entry(java_lang_math_log10)
 224   method_entry(java_lang_math_exp  )
 225   method_entry(java_lang_math_pow  )
 226   method_entry(java_lang_math_fmaF )
 227   method_entry(java_lang_math_fmaD )
 228   method_entry(java_lang_ref_reference_get)
 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 */
 277                    generate_deopt_entry_for(atos, i),
 278                    deopt_itos, /* itos */
 279                    generate_deopt_entry_for(ltos, i),
 280                    generate_deopt_entry_for(ftos, i),
 281                    generate_deopt_entry_for(dtos, i),
 282                    generate_deopt_entry_for(vtos, i)
 283                    );
 284     }
 285     address return_continuation = Interpreter::_normal_table.entry(Bytecodes::_return).entry(vtos);
 286     vmassert(return_continuation != NULL, "return entry not generated yet");
 287     Interpreter::_deopt_reexecute_return_entry = generate_deopt_entry_for(vtos, 0, return_continuation);
 288   }
 289 
 290 }
 291 
 292 //------------------------------------------------------------------------------------------------------------------------
 293 
 294 address TemplateInterpreterGenerator::generate_error_exit(const char* msg) {
 295   address entry = __ pc();
 296   __ stop(msg);
 297   return entry;
 298 }
 299 
 300 
 301 //------------------------------------------------------------------------------------------------------------------------
 302 
 303 void TemplateInterpreterGenerator::set_entry_points_for_all_bytes() {
 304   for (int i = 0; i < DispatchTable::length; i++) {
 305     Bytecodes::Code code = (Bytecodes::Code)i;
 306     if (Bytecodes::is_defined(code)) {
 307       set_entry_points(code);
 308     } else {
 309       set_unimplemented(i);
 310     }
 311   }
 312 }
 313 
 314 
 315 void TemplateInterpreterGenerator::set_safepoints_for_all_bytes() {
 316   for (int i = 0; i < DispatchTable::length; i++) {
 317     Bytecodes::Code code = (Bytecodes::Code)i;
 318     if (Bytecodes::is_defined(code)) Interpreter::_safept_table.set_entry(code, Interpreter::_safept_entry);
 319   }
 320 }
 321 
 322 
 323 void TemplateInterpreterGenerator::set_unimplemented(int i) {
 324   address e = _unimplemented_bytecode;
 325   EntryPoint entry(e, e, e, e, e, e, e, e, e, e);
 326   Interpreter::_normal_table.set_entry(i, entry);
 327   Interpreter::_wentry_point[i] = _unimplemented_bytecode;
 328 }
 329 
 330 
 331 void TemplateInterpreterGenerator::set_entry_points(Bytecodes::Code code) {
 332   CodeletMark cm(_masm, Bytecodes::name(code), code);
 333   // initialize entry points
 334   assert(_unimplemented_bytecode    != NULL, "should have been generated before");
 335   assert(_illegal_bytecode_sequence != NULL, "should have been generated before");
 336   address bep = _illegal_bytecode_sequence;
 337   address zep = _illegal_bytecode_sequence;
 338   address cep = _illegal_bytecode_sequence;
 339   address sep = _illegal_bytecode_sequence;
 340   address aep = _illegal_bytecode_sequence;
 341   address iep = _illegal_bytecode_sequence;
 342   address lep = _illegal_bytecode_sequence;
 343   address fep = _illegal_bytecode_sequence;
 344   address dep = _illegal_bytecode_sequence;
 345   address vep = _unimplemented_bytecode;
 346   address wep = _unimplemented_bytecode;
 347   // code for short & wide version of bytecode
 348   if (Bytecodes::is_defined(code)) {
 349     Template* t = TemplateTable::template_for(code);
 350     assert(t->is_valid(), "just checking");
 351     set_short_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep);
 352   }
 353   if (Bytecodes::wide_is_defined(code)) {
 354     Template* t = TemplateTable::template_for_wide(code);
 355     assert(t->is_valid(), "just checking");
 356     set_wide_entry_point(t, wep);
 357   }
 358   // set entry points
 359   EntryPoint entry(bep, zep, cep, sep, aep, iep, lep, fep, dep, vep);
 360   Interpreter::_normal_table.set_entry(code, entry);
 361   Interpreter::_wentry_point[code] = wep;
 362 }
 363 
 364 
 365 void TemplateInterpreterGenerator::set_wide_entry_point(Template* t, address& wep) {
 366   assert(t->is_valid(), "template must exist");
 367   assert(t->tos_in() == vtos, "only vtos tos_in supported for wide instructions");
 368   wep = __ pc(); generate_and_dispatch(t);
 369 }
 370 
 371 
 372 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) {
 373   assert(t->is_valid(), "template must exist");
 374   switch (t->tos_in()) {
 375     case btos:
 376     case ztos:
 377     case ctos:
 378     case stos:
 379       ShouldNotReachHere();  // btos/ctos/stos should use itos.
 380       break;
 381     case atos: vep = __ pc(); __ pop(atos); aep = __ pc(); generate_and_dispatch(t); break;
 382     case itos: vep = __ pc(); __ pop(itos); iep = __ pc(); generate_and_dispatch(t); break;
 383     case ltos: vep = __ pc(); __ pop(ltos); lep = __ pc(); generate_and_dispatch(t); break;
 384     case ftos: vep = __ pc(); __ pop(ftos); fep = __ pc(); generate_and_dispatch(t); break;
 385     case dtos: vep = __ pc(); __ pop(dtos); dep = __ pc(); generate_and_dispatch(t); break;
 386     case vtos: set_vtos_entry_points(t, bep, cep, sep, aep, iep, lep, fep, dep, vep);     break;
 387     default  : ShouldNotReachHere();                                                 break;
 388   }
 389 }
 390 
 391 
 392 //------------------------------------------------------------------------------------------------------------------------
 393 
 394 void TemplateInterpreterGenerator::generate_and_dispatch(Template* t, TosState tos_out) {
 395   if (PrintBytecodeHistogram)                                    histogram_bytecode(t);
 396 #ifndef PRODUCT
 397   // debugging code
 398   if (CountBytecodes || TraceBytecodes || StopInterpreterAt > 0) count_bytecode();
 399   if (PrintBytecodePairHistogram)                                histogram_bytecode_pair(t);
 400   if (TraceBytecodes)                                            trace_bytecode(t);
 401   if (StopInterpreterAt > 0)                                     stop_interpreter_at();
 402   __ verify_FPU(1, t->tos_in());
 403 #endif // !PRODUCT
 404   int step = 0;
 405   if (!t->does_dispatch()) {
 406     step = t->is_wide() ? Bytecodes::wide_length_for(t->bytecode()) : Bytecodes::length_for(t->bytecode());
 407     if (tos_out == ilgl) tos_out = t->tos_out();
 408     // compute bytecode size
 409     assert(step > 0, "just checkin'");
 410     // setup stuff for dispatching next bytecode
 411     if (ProfileInterpreter && VerifyDataPointer
 412         && MethodData::bytecode_has_profile(t->bytecode())) {
 413       __ verify_method_data_pointer();
 414     }
 415     __ dispatch_prolog(tos_out, step);
 416   }
 417   // generate template
 418   t->generate(_masm);
 419   // advance
 420   if (t->does_dispatch()) {
 421 #ifdef ASSERT
 422     // make sure execution doesn't go beyond this point if code is broken
 423     __ should_not_reach_here();
 424 #endif // ASSERT
 425   } else {
 426     // dispatch to next bytecode
 427     __ dispatch_epilog(tos_out, step);
 428   }
 429 }
 430 
 431 // Generate method entries
 432 address TemplateInterpreterGenerator::generate_method_entry(
 433                                         AbstractInterpreter::MethodKind kind) {
 434   // determine code generation flags
 435   bool native = false;
 436   bool synchronized = false;
 437   address entry_point = NULL;
 438 
 439   switch (kind) {
 440   case Interpreter::zerolocals             :                                          break;
 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
 495                                            : native = true; entry_point = generate_Double_doubleToRawLongBits_entry(); break;
 496 #else
 497   case Interpreter::java_lang_Float_intBitsToFloat:
 498   case Interpreter::java_lang_Float_floatToRawIntBits:
 499   case Interpreter::java_lang_Double_longBitsToDouble:
 500   case Interpreter::java_lang_Double_doubleToRawLongBits:
 501     native = true;
 502     break;
 503 #endif // !IA32
 504   default:
 505     fatal("unexpected method kind: %d", kind);
 506     break;
 507   }
 508 
 509   if (entry_point) {
 510     return entry_point;
 511   }
 512 
 513   // We expect the normal and native entry points to be generated first so we can reuse them.
 514   if (native) {
 515     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::native_synchronized : Interpreter::native);
 516     if (entry_point == NULL) {
 517       entry_point = generate_native_entry(synchronized);
 518     }
 519   } else {
 520     entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::zerolocals_synchronized : Interpreter::zerolocals);
 521     if (entry_point == NULL) {
 522       entry_point = generate_normal_entry(synchronized);
 523     }
 524   }
 525 
 526   return entry_point;
 527 }
 528 #endif // !CC_INTERP