hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
changeset 24322 c2978d1578e3
parent 22741 13fdeb7d7aad
child 25715 d5a8dbdc5150
equal deleted inserted replaced
24320:394d55c783dc 24322:c2978d1578e3
  3177   const Register rbx_method = rbx;
  3177   const Register rbx_method = rbx;
  3178   const Register rax_mtype  = rax;
  3178   const Register rax_mtype  = rax;
  3179   const Register rcx_recv   = rcx;
  3179   const Register rcx_recv   = rcx;
  3180   const Register rdx_flags  = rdx;
  3180   const Register rdx_flags  = rdx;
  3181 
  3181 
  3182   if (!EnableInvokeDynamic) {
       
  3183     // rewriter does not generate this bytecode
       
  3184     __ should_not_reach_here();
       
  3185     return;
       
  3186   }
       
  3187 
       
  3188   prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
  3182   prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
  3189   __ verify_method_ptr(rbx_method);
  3183   __ verify_method_ptr(rbx_method);
  3190   __ verify_oop(rcx_recv);
  3184   __ verify_oop(rcx_recv);
  3191   __ null_check(rcx_recv);
  3185   __ null_check(rcx_recv);
  3192 
  3186 
  3204 
  3198 
  3205 
  3199 
  3206 void TemplateTable::invokedynamic(int byte_no) {
  3200 void TemplateTable::invokedynamic(int byte_no) {
  3207   transition(vtos, vtos);
  3201   transition(vtos, vtos);
  3208   assert(byte_no == f1_byte, "use this argument");
  3202   assert(byte_no == f1_byte, "use this argument");
  3209 
       
  3210   if (!EnableInvokeDynamic) {
       
  3211     // We should not encounter this bytecode if !EnableInvokeDynamic.
       
  3212     // The verifier will stop it.  However, if we get past the verifier,
       
  3213     // this will stop the thread in a reasonable way, without crashing the JVM.
       
  3214     __ call_VM(noreg, CAST_FROM_FN_PTR(address,
       
  3215                      InterpreterRuntime::throw_IncompatibleClassChangeError));
       
  3216     // the call_VM checks for exception, so we should never return here.
       
  3217     __ should_not_reach_here();
       
  3218     return;
       
  3219   }
       
  3220 
  3203 
  3221   const Register rbx_method   = rbx;
  3204   const Register rbx_method   = rbx;
  3222   const Register rax_callsite = rax;
  3205   const Register rax_callsite = rax;
  3223 
  3206 
  3224   prepare_invoke(byte_no, rbx_method, rax_callsite);
  3207   prepare_invoke(byte_no, rbx_method, rax_callsite);