hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
changeset 9328 144894b3384b
parent 9324 c2e97d1d66d2
child 9333 36b8f9661154
equal deleted inserted replaced
9327:23532ae85295 9328:144894b3384b
  3072   __ should_not_reach_here();
  3072   __ should_not_reach_here();
  3073 }
  3073 }
  3074 
  3074 
  3075 void TemplateTable::invokedynamic(int byte_no) {
  3075 void TemplateTable::invokedynamic(int byte_no) {
  3076   transition(vtos, vtos);
  3076   transition(vtos, vtos);
       
  3077   assert(byte_no == f1_oop, "use this argument");
  3077 
  3078 
  3078   if (!EnableInvokeDynamic) {
  3079   if (!EnableInvokeDynamic) {
  3079     // We should not encounter this bytecode if !EnableInvokeDynamic.
  3080     // We should not encounter this bytecode if !EnableInvokeDynamic.
  3080     // The verifier will stop it.  However, if we get past the verifier,
  3081     // The verifier will stop it.  However, if we get past the verifier,
  3081     // this will stop the thread in a reasonable way, without crashing the JVM.
  3082     // this will stop the thread in a reasonable way, without crashing the JVM.
  3084     // the call_VM checks for exception, so we should never return here.
  3085     // the call_VM checks for exception, so we should never return here.
  3085     __ should_not_reach_here();
  3086     __ should_not_reach_here();
  3086     return;
  3087     return;
  3087   }
  3088   }
  3088 
  3089 
  3089   assert(byte_no == f1_oop, "use this argument");
       
  3090   prepare_invoke(rax, rbx, byte_no);
  3090   prepare_invoke(rax, rbx, byte_no);
  3091 
  3091 
  3092   // rax: CallSite object (f1)
  3092   // rax: CallSite object (f1)
  3093   // rbx: unused (f2)
  3093   // rbx: unused (f2)
  3094   // rcx: receiver address
  3094   // rcx: receiver address
  3095   // rdx: flags (unused)
  3095   // rdx: flags (unused)
  3096 
  3096 
  3097   Register rax_callsite      = rax;
  3097   Register rax_callsite      = rax;
  3098   Register rcx_method_handle = rcx;
  3098   Register rcx_method_handle = rcx;
  3099 
  3099 
  3100   if (ProfileInterpreter) {
  3100   // %%% should make a type profile for any invokedynamic that takes a ref argument
  3101     // %%% should make a type profile for any invokedynamic that takes a ref argument
  3101   // profile this call
  3102     // profile this call
  3102   __ profile_call(rsi);
  3103     __ profile_call(rsi);
  3103 
  3104   }
  3104   __ verify_oop(rax_callsite);
  3105 
  3105   __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rdx)));
  3106   __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rcx)));
       
  3107   __ null_check(rcx_method_handle);
  3106   __ null_check(rcx_method_handle);
       
  3107   __ verify_oop(rcx_method_handle);
  3108   __ prepare_to_jump_from_interpreted();
  3108   __ prepare_to_jump_from_interpreted();
  3109   __ jump_to_method_handle_entry(rcx_method_handle, rdx);
  3109   __ jump_to_method_handle_entry(rcx_method_handle, rdx);
  3110 }
  3110 }
  3111 
  3111 
  3112 //----------------------------------------------------------------------------------------------------
  3112 //----------------------------------------------------------------------------------------------------