--- old/src/cpu/sparc/vm/templateInterpreter_sparc.cpp 2012-12-05 15:26:53.283461639 -0500 +++ new/src/cpu/sparc/vm/templateInterpreter_sparc.cpp 2012-12-05 15:26:52.132944366 -0500 @@ -494,8 +494,6 @@ // (gri - 2/25/2000) - const Address size_of_parameters(G5_method, Method::size_of_parameters_offset()); - const Address size_of_locals (G5_method, Method::size_of_locals_offset()); const Address constMethod (G5_method, Method::const_offset()); int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong ); @@ -511,7 +509,8 @@ // Lscratch can't be used as a temporary because the call_stub uses // it to assert that the stack frame was setup correctly. - __ lduh( size_of_parameters, Glocals_size); + __ ld_ptr( constMethod, Glocals_size ); + __ lduh( Glocals_size, in_bytes(ConstMethod::size_of_parameters_offset()), Glocals_size); // Gargs points to first local + BytesPerWord // Set the saved SP after the register window save @@ -530,7 +529,8 @@ // // Compute number of locals in method apart from incoming parameters // - __ lduh( size_of_locals, Otmp1 ); + __ ld_ptr( G5_method, Method::const_offset(), Otmp1 ); + __ lduh( Otmp1, in_bytes(ConstMethod::size_of_locals_offset()), Otmp1 ); __ sub( Otmp1, Glocals_size, Glocals_size ); __ round_to( Glocals_size, WordsPerLong ); __ sll( Glocals_size, Interpreter::logStackElementSize, Glocals_size ); @@ -1256,8 +1256,6 @@ // make sure registers are different! assert_different_registers(G2_thread, G5_method, Gargs, Gtmp1, Gtmp2); - const Address size_of_parameters(G5_method, Method::size_of_parameters_offset()); - const Address size_of_locals (G5_method, Method::size_of_locals_offset()); // Seems like G5_method is live at the point this is used. So we could make this look consistent // and use in the asserts. const Address access_flags (Lmethod, Method::access_flags_offset()); @@ -1309,8 +1307,9 @@ // NOTE: If you change the frame layout, this code will need to // be updated! - __ lduh( size_of_locals, O2 ); - __ lduh( size_of_parameters, O1 ); + __ ld_ptr( G5_method, Method::const_offset(), O1 ); + __ lduh( O1, in_bytes(ConstMethod::size_of_locals_offset()), O2 ); + __ lduh( O1, in_bytes(ConstMethod::size_of_parameters_offset()), O1 ); __ sll( O2, Interpreter::logStackElementSize, O2); __ sll( O1, Interpreter::logStackElementSize, O1 ); __ sub( Llocals, O2, O2 ); @@ -1825,7 +1824,8 @@ const Register Gtmp2 = G1_scratch; // Compute size of arguments for saving when returning to deoptimized caller - __ lduh(Lmethod, in_bytes(Method::size_of_parameters_offset()), Gtmp1); + __ ld_ptr(Lmethod, in_bytes(Method::const_offset()), Gtmp1); + __ lduh(Gtmp1, in_bytes(ConstMethod::size_of_parameters_offset()), Gtmp1); __ sll(Gtmp1, Interpreter::logStackElementSize, Gtmp1); __ sub(Llocals, Gtmp1, Gtmp2); __ add(Gtmp2, wordSize, Gtmp2);