1.1 --- a/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Jan 06 16:18:29 2012 -0800 1.2 +++ b/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Jan 06 20:09:20 2012 -0800 1.3 @@ -888,7 +888,7 @@ 1.4 1.5 // do fast instanceof cache test 1.6 1.7 - __ ld_ptr(O4, sizeof(oopDesc) + objArrayKlass::element_klass_offset_in_bytes(), O4); 1.8 + __ ld_ptr(O4, in_bytes(objArrayKlass::element_klass_offset()), O4); 1.9 1.10 assert(Otos_i == O0, "just checking"); 1.11 1.12 @@ -2031,7 +2031,7 @@ 1.13 __ access_local_ptr(G3_scratch, Otos_i); 1.14 __ load_klass(Otos_i, O2); 1.15 __ set(JVM_ACC_HAS_FINALIZER, G3); 1.16 - __ ld(O2, Klass::access_flags_offset_in_bytes() + sizeof(oopDesc), O2); 1.17 + __ ld(O2, in_bytes(Klass::access_flags_offset()), O2); 1.18 __ andcc(G3, O2, G0); 1.19 Label skip_register_finalizer; 1.20 __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer); 1.21 @@ -3350,13 +3350,13 @@ 1.22 __ ld_ptr(Rscratch, Roffset, RinstanceKlass); 1.23 1.24 // make sure klass is fully initialized: 1.25 - __ ldub(RinstanceKlass, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc), G3_scratch); 1.26 + __ ldub(RinstanceKlass, in_bytes(instanceKlass::init_state_offset()), G3_scratch); 1.27 __ cmp(G3_scratch, instanceKlass::fully_initialized); 1.28 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); 1.29 - __ delayed()->ld(RinstanceKlass, Klass::layout_helper_offset_in_bytes() + sizeof(oopDesc), Roffset); 1.30 + __ delayed()->ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset); 1.31 1.32 // get instance_size in instanceKlass (already aligned) 1.33 - //__ ld(RinstanceKlass, Klass::layout_helper_offset_in_bytes() + sizeof(oopDesc), Roffset); 1.34 + //__ ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset); 1.35 1.36 // make sure klass does not have has_finalizer, or is abstract, or interface or java/lang/Class 1.37 __ btst(Klass::_lh_instance_slow_path_bit, Roffset); 1.38 @@ -3483,7 +3483,7 @@ 1.39 __ bind(initialize_header); 1.40 1.41 if (UseBiasedLocking) { 1.42 - __ ld_ptr(RinstanceKlass, Klass::prototype_header_offset_in_bytes() + sizeof(oopDesc), G4_scratch); 1.43 + __ ld_ptr(RinstanceKlass, in_bytes(Klass::prototype_header_offset()), G4_scratch); 1.44 } else { 1.45 __ set((intptr_t)markOopDesc::prototype(), G4_scratch); 1.46 }