Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/templateTable_x86_64.cpp @ 6822:f6b0eb4e44cf
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
Reviewed-by: jrose, kvn
author | twisti |
---|---|
date | Mon, 01 Oct 2012 14:50:10 -0700 |
parents | 75f33eecc1b3 |
children | 6e5a59a8e4a7 |
comparison
equal
deleted
inserted
replaced
6811:1b582b1bf7cb | 6822:f6b0eb4e44cf |
---|---|
2182 ConstantPoolCacheEntry::flags_offset()); | 2182 ConstantPoolCacheEntry::flags_offset()); |
2183 // access constant pool cache fields | 2183 // access constant pool cache fields |
2184 const int index_offset = in_bytes(ConstantPoolCache::base_offset() + | 2184 const int index_offset = in_bytes(ConstantPoolCache::base_offset() + |
2185 ConstantPoolCacheEntry::f2_offset()); | 2185 ConstantPoolCacheEntry::f2_offset()); |
2186 | 2186 |
2187 size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2)); | 2187 size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2)); |
2188 resolve_cache_and_index(byte_no, cache, index, index_size); | 2188 resolve_cache_and_index(byte_no, cache, index, index_size); |
2189 __ movptr(method, Address(cache, index, Address::times_ptr, method_offset)); | 2189 __ movptr(method, Address(cache, index, Address::times_ptr, method_offset)); |
2190 | 2190 |
2191 if (itable_index != noreg) { | 2191 if (itable_index != noreg) { |
2192 // pick up itable or appendix index from f2 also: | 2192 // pick up itable or appendix index from f2 also: |
2924 // Push the appendix as a trailing parameter. | 2924 // Push the appendix as a trailing parameter. |
2925 // This must be done before we get the receiver, | 2925 // This must be done before we get the receiver, |
2926 // since the parameter_size includes it. | 2926 // since the parameter_size includes it. |
2927 __ push(rbx); | 2927 __ push(rbx); |
2928 __ mov(rbx, index); | 2928 __ mov(rbx, index); |
2929 assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0"); | |
2929 __ load_resolved_reference_at_index(index, rbx); | 2930 __ load_resolved_reference_at_index(index, rbx); |
2930 __ pop(rbx); | 2931 __ pop(rbx); |
2931 __ push(index); // push appendix (MethodType, CallSite, etc.) | 2932 __ push(index); // push appendix (MethodType, CallSite, etc.) |
2932 __ bind(L_no_push); | 2933 __ bind(L_no_push); |
2933 } | 2934 } |
3142 | 3143 |
3143 | 3144 |
3144 void TemplateTable::invokehandle(int byte_no) { | 3145 void TemplateTable::invokehandle(int byte_no) { |
3145 transition(vtos, vtos); | 3146 transition(vtos, vtos); |
3146 assert(byte_no == f1_byte, "use this argument"); | 3147 assert(byte_no == f1_byte, "use this argument"); |
3147 const Register rbx_method = rbx; // f2 | 3148 const Register rbx_method = rbx; |
3148 const Register rax_mtype = rax; // f1 | 3149 const Register rax_mtype = rax; |
3149 const Register rcx_recv = rcx; | 3150 const Register rcx_recv = rcx; |
3150 const Register rdx_flags = rdx; | 3151 const Register rdx_flags = rdx; |
3151 | 3152 |
3152 if (!EnableInvokeDynamic) { | 3153 if (!EnableInvokeDynamic) { |
3153 // rewriter does not generate this bytecode | 3154 // rewriter does not generate this bytecode |
3154 __ should_not_reach_here(); | 3155 __ should_not_reach_here(); |
3155 return; | 3156 return; |
3156 } | 3157 } |
3157 | 3158 |
3158 prepare_invoke(byte_no, | 3159 prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv); |
3159 rbx_method, rax_mtype, // get f2 Method*, f1 MethodType | |
3160 rcx_recv); | |
3161 __ verify_method_ptr(rbx_method); | 3160 __ verify_method_ptr(rbx_method); |
3162 __ verify_oop(rcx_recv); | 3161 __ verify_oop(rcx_recv); |
3163 __ null_check(rcx_recv); | 3162 __ null_check(rcx_recv); |
3163 | |
3164 // rax: MethodType object (from cpool->resolved_references[f1], if necessary) | |
3165 // rbx: MH.invokeExact_MT method (from f2) | |
3164 | 3166 |
3165 // Note: rax_mtype is already pushed (if necessary) by prepare_invoke | 3167 // Note: rax_mtype is already pushed (if necessary) by prepare_invoke |
3166 | 3168 |
3167 // FIXME: profile the LambdaForm also | 3169 // FIXME: profile the LambdaForm also |
3168 __ profile_final_call(rax); | 3170 __ profile_final_call(rax); |
3189 const Register rbx_method = rbx; | 3191 const Register rbx_method = rbx; |
3190 const Register rax_callsite = rax; | 3192 const Register rax_callsite = rax; |
3191 | 3193 |
3192 prepare_invoke(byte_no, rbx_method, rax_callsite); | 3194 prepare_invoke(byte_no, rbx_method, rax_callsite); |
3193 | 3195 |
3194 // rax: CallSite object (from cpool->resolved_references[]) | 3196 // rax: CallSite object (from cpool->resolved_references[f1]) |
3195 // rbx: MH.linkToCallSite method (from f2) | 3197 // rbx: MH.linkToCallSite method (from f2) |
3196 | 3198 |
3197 // Note: rax_callsite is already pushed by prepare_invoke | 3199 // Note: rax_callsite is already pushed by prepare_invoke |
3198 | 3200 |
3199 // %%% should make a type profile for any invokedynamic that takes a ref argument | 3201 // %%% should make a type profile for any invokedynamic that takes a ref argument |