324 |
324 |
325 // We are resolved if the resolved reference cache entry contains a |
325 // We are resolved if the resolved reference cache entry contains a |
326 // non-null object (CallSite, etc.) |
326 // non-null object (CallSite, etc.) |
327 assert_different_registers(Otos_i, G3_scratch); |
327 assert_different_registers(Otos_i, G3_scratch); |
328 __ get_cache_index_at_bcp(Otos_i, G3_scratch, 1, index_size); // load index => G3_scratch |
328 __ get_cache_index_at_bcp(Otos_i, G3_scratch, 1, index_size); // load index => G3_scratch |
329 __ load_resolved_reference_at_index(Otos_i, G3_scratch); |
329 __ load_resolved_reference_at_index(Otos_i, G3_scratch, Lscratch); |
330 __ tst(Otos_i); |
330 __ tst(Otos_i); |
331 __ br(Assembler::notEqual, false, Assembler::pt, resolved); |
331 __ br(Assembler::notEqual, false, Assembler::pt, resolved); |
332 __ delayed()->set((int)bytecode(), O1); |
332 __ delayed()->set((int)bytecode(), O1); |
333 |
333 |
334 address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc); |
334 address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc); |
2014 Register Rcache, |
2014 Register Rcache, |
2015 Register index, |
2015 Register index, |
2016 Register Roffset, |
2016 Register Roffset, |
2017 Register Rflags, |
2017 Register Rflags, |
2018 bool is_static) { |
2018 bool is_static) { |
2019 assert_different_registers(Rcache, Rflags, Roffset); |
2019 assert_different_registers(Rcache, Rflags, Roffset, Lscratch); |
2020 |
2020 |
2021 ByteSize cp_base_offset = ConstantPoolCache::base_offset(); |
2021 ByteSize cp_base_offset = ConstantPoolCache::base_offset(); |
2022 |
2022 |
2023 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags); |
2023 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags); |
2024 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset); |
2024 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset); |
2025 if (is_static) { |
2025 if (is_static) { |
2026 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f1_offset(), Robj); |
2026 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f1_offset(), Robj); |
2027 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); |
2027 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); |
2028 __ ld_ptr( Robj, mirror_offset, Robj); |
2028 __ ld_ptr( Robj, mirror_offset, Robj); |
2029 __ resolve_oop_handle(Robj); |
2029 __ resolve_oop_handle(Robj, Lscratch); |
2030 } |
2030 } |
2031 } |
2031 } |
2032 |
2032 |
2033 // The registers Rcache and index expected to be set before call. |
2033 // The registers Rcache and index expected to be set before call. |
2034 // Correct values of the Rcache and index registers are preserved. |
2034 // Correct values of the Rcache and index registers are preserved. |
2845 __ delayed()->nop(); |
2845 __ delayed()->nop(); |
2846 // Push the appendix as a trailing parameter. |
2846 // Push the appendix as a trailing parameter. |
2847 // This must be done before we get the receiver, |
2847 // This must be done before we get the receiver, |
2848 // since the parameter_size includes it. |
2848 // since the parameter_size includes it. |
2849 assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0"); |
2849 assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0"); |
2850 __ load_resolved_reference_at_index(temp, index); |
2850 __ load_resolved_reference_at_index(temp, index, /*tmp*/recv); |
2851 __ verify_oop(temp); |
2851 __ verify_oop(temp); |
2852 __ push_ptr(temp); // push appendix (MethodType, CallSite, etc.) |
2852 __ push_ptr(temp); // push appendix (MethodType, CallSite, etc.) |
2853 __ bind(L_no_push); |
2853 __ bind(L_no_push); |
2854 } |
2854 } |
2855 |
2855 |