Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/vtableStubs_sparc.cpp @ 6266:1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI
Summary: remove assembly code for JDK 7 chained method handles
Reviewed-by: jrose, twisti, kvn, mhaupt
Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author | twisti |
---|---|
date | Tue, 24 Jul 2012 10:51:00 -0700 |
parents | 6729bbc1fcd6 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6241:aba91a731143 | 6266:1d7922586cf6 |
---|---|
68 // get receiver klass | 68 // get receiver klass |
69 address npe_addr = __ pc(); | 69 address npe_addr = __ pc(); |
70 __ load_klass(O0, G3_scratch); | 70 __ load_klass(O0, G3_scratch); |
71 | 71 |
72 // set methodOop (in case of interpreted method), and destination address | 72 // set methodOop (in case of interpreted method), and destination address |
73 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); | |
74 #ifndef PRODUCT | 73 #ifndef PRODUCT |
75 if (DebugVtables) { | 74 if (DebugVtables) { |
76 Label L; | 75 Label L; |
77 // check offset vs vtable length | 76 // check offset vs vtable length |
78 __ ld(G3_scratch, instanceKlass::vtable_length_offset()*wordSize, G5); | 77 __ ld(G3_scratch, instanceKlass::vtable_length_offset()*wordSize, G5); |
80 __ set(vtable_index, O2); | 79 __ set(vtable_index, O2); |
81 __ call_VM(noreg, CAST_FROM_FN_PTR(address, bad_compiled_vtable_index), O0, O2); | 80 __ call_VM(noreg, CAST_FROM_FN_PTR(address, bad_compiled_vtable_index), O0, O2); |
82 __ bind(L); | 81 __ bind(L); |
83 } | 82 } |
84 #endif | 83 #endif |
85 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); | 84 |
86 if (Assembler::is_simm13(v_off)) { | 85 __ lookup_virtual_method(G3_scratch, vtable_index, G5_method); |
87 __ ld_ptr(G3, v_off, G5_method); | |
88 } else { | |
89 __ set(v_off,G5); | |
90 __ ld_ptr(G3, G5, G5_method); | |
91 } | |
92 | 86 |
93 #ifndef PRODUCT | 87 #ifndef PRODUCT |
94 if (DebugVtables) { | 88 if (DebugVtables) { |
95 Label L; | 89 Label L; |
96 __ br_notnull_short(G5_method, Assembler::pt, L); | 90 __ br_notnull_short(G5_method, Assembler::pt, L); |