hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
changeset 24322 c2978d1578e3
parent 21520 9f3ba7e1ed5c
child 25715 d5a8dbdc5150
equal deleted inserted replaced
24320:394d55c783dc 24322:c2978d1578e3
  3126   const Register rbx_method = rbx;
  3126   const Register rbx_method = rbx;
  3127   const Register rax_mtype  = rax;
  3127   const Register rax_mtype  = rax;
  3128   const Register rcx_recv   = rcx;
  3128   const Register rcx_recv   = rcx;
  3129   const Register rdx_flags  = rdx;
  3129   const Register rdx_flags  = rdx;
  3130 
  3130 
  3131   if (!EnableInvokeDynamic) {
       
  3132     // rewriter does not generate this bytecode
       
  3133     __ should_not_reach_here();
       
  3134     return;
       
  3135   }
       
  3136 
       
  3137   prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
  3131   prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
  3138   __ verify_method_ptr(rbx_method);
  3132   __ verify_method_ptr(rbx_method);
  3139   __ verify_oop(rcx_recv);
  3133   __ verify_oop(rcx_recv);
  3140   __ null_check(rcx_recv);
  3134   __ null_check(rcx_recv);
  3141 
  3135 
  3153 
  3147 
  3154 
  3148 
  3155 void TemplateTable::invokedynamic(int byte_no) {
  3149 void TemplateTable::invokedynamic(int byte_no) {
  3156   transition(vtos, vtos);
  3150   transition(vtos, vtos);
  3157   assert(byte_no == f1_byte, "use this argument");
  3151   assert(byte_no == f1_byte, "use this argument");
  3158 
       
  3159   if (!EnableInvokeDynamic) {
       
  3160     // We should not encounter this bytecode if !EnableInvokeDynamic.
       
  3161     // The verifier will stop it.  However, if we get past the verifier,
       
  3162     // this will stop the thread in a reasonable way, without crashing the JVM.
       
  3163     __ call_VM(noreg, CAST_FROM_FN_PTR(address,
       
  3164                      InterpreterRuntime::throw_IncompatibleClassChangeError));
       
  3165     // the call_VM checks for exception, so we should never return here.
       
  3166     __ should_not_reach_here();
       
  3167     return;
       
  3168   }
       
  3169 
  3152 
  3170   const Register rbx_method   = rbx;
  3153   const Register rbx_method   = rbx;
  3171   const Register rax_callsite = rax;
  3154   const Register rax_callsite = rax;
  3172 
  3155 
  3173   prepare_invoke(byte_no, rbx_method, rax_callsite);
  3156   prepare_invoke(byte_no, rbx_method, rax_callsite);