comparison src/cpu/sparc/vm/vtableStubs_sparc.cpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents f8236e79048a
children d1605aabd0a1
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
58 58
59 assert(VtableStub::receiver_location() == O0->as_VMReg(), "receiver expected in O0"); 59 assert(VtableStub::receiver_location() == O0->as_VMReg(), "receiver expected in O0");
60 60
61 // get receiver klass 61 // get receiver klass
62 address npe_addr = __ pc(); 62 address npe_addr = __ pc();
63 __ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), G3_scratch); 63 __ load_klass(O0, G3_scratch);
64 64
65 // set methodOop (in case of interpreted method), and destination address 65 // set methodOop (in case of interpreted method), and destination address
66 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 66 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
67 #ifndef PRODUCT 67 #ifndef PRODUCT
68 if (DebugVtables) { 68 if (DebugVtables) {
129 // O0: Receiver 129 // O0: Receiver
130 assert(VtableStub::receiver_location() == O0->as_VMReg(), "receiver expected in O0"); 130 assert(VtableStub::receiver_location() == O0->as_VMReg(), "receiver expected in O0");
131 131
132 // get receiver klass (also an implicit null-check) 132 // get receiver klass (also an implicit null-check)
133 address npe_addr = __ pc(); 133 address npe_addr = __ pc();
134 __ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), G3_klassOop); 134 __ load_klass(O0, G3_klassOop);
135 __ verify_oop(G3_klassOop); 135 __ verify_oop(G3_klassOop);
136 136
137 // Push a new window to get some temp registers. This chops the head of all 137 // Push a new window to get some temp registers. This chops the head of all
138 // my 64-bit %o registers in the LION build, but this is OK because no longs 138 // my 64-bit %o registers in the LION build, but this is OK because no longs
139 // are passed in the %o registers. Instead, longs are passed in G1 and G4 139 // are passed in the %o registers. Instead, longs are passed in G1 and G4
235 int VtableStub::pd_code_size_limit(bool is_vtable_stub) { 235 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
236 if (TraceJumps || DebugVtables || CountCompiledCalls || VerifyOops) return 1000; 236 if (TraceJumps || DebugVtables || CountCompiledCalls || VerifyOops) return 1000;
237 else { 237 else {
238 const int slop = 2*BytesPerInstWord; // sethi;add (needed for long offsets) 238 const int slop = 2*BytesPerInstWord; // sethi;add (needed for long offsets)
239 if (is_vtable_stub) { 239 if (is_vtable_stub) {
240 const int basic = 5*BytesPerInstWord; // ld;ld;ld,jmp,nop 240 // ld;ld;ld,jmp,nop
241 const int basic = 5*BytesPerInstWord +
242 // shift;add for load_klass
243 (UseCompressedOops ? 2*BytesPerInstWord : 0);
241 return basic + slop; 244 return basic + slop;
242 } else { 245 } else {
243 // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore, sethi, jmpl, restore 246 // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore, sethi, jmpl, restore
244 const int basic = (20 LP64_ONLY(+ 6)) * BytesPerInstWord; 247 const int basic = (20 LP64_ONLY(+ 6)) * BytesPerInstWord +
248 // shift;add for load_klass
249 (UseCompressedOops ? 2*BytesPerInstWord : 0);
245 return (basic + slop); 250 return (basic + slop);
246 } 251 }
247 } 252 }
248 } 253 }
249 254