comparison src/cpu/x86/vm/templateTable_x86_32.cpp @ 3279:08ccee2c4dbf

6993078: JSR 292 too many pushes: Lesp points into register window Reviewed-by: kvn, never
author twisti
date Thu, 21 Apr 2011 00:25:40 -0700
parents bbe95b4337f1
children 286c498ae0d4
comparison
equal deleted inserted replaced
3278:66b0e2371912 3279:08ccee2c4dbf
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 //----------------------------------------------------------------------------------------------------