src/cpu/sparc/vm/templateInterpreter_sparc.cpp

Print this page

        

*** 492,503 **** // is necessary. // // (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 ); const int extra_space = rounded_vm_local_words + // frame local scratch space --- 492,501 ----
*** 509,519 **** const Register Otmp1 = O3; const Register Otmp2 = O4; // 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); // Gargs points to first local + BytesPerWord // Set the saved SP after the register window save // assert_different_registers(Gargs, Glocals_size, Gframe_size, O5_savedSP); --- 507,518 ---- const Register Otmp1 = O3; const Register Otmp2 = O4; // Lscratch can't be used as a temporary because the call_stub uses // it to assert that the stack frame was setup correctly. ! __ 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 // assert_different_registers(Gargs, Glocals_size, Gframe_size, O5_savedSP);
*** 528,538 **** } else { // // Compute number of locals in method apart from incoming parameters // ! __ lduh( size_of_locals, Otmp1 ); __ sub( Otmp1, Glocals_size, Glocals_size ); __ round_to( Glocals_size, WordsPerLong ); __ sll( Glocals_size, Interpreter::logStackElementSize, Glocals_size ); // see if the frame is greater than one page in size. If so, --- 527,538 ---- } else { // // Compute number of locals in method apart from incoming parameters // ! __ 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 ); // see if the frame is greater than one page in size. If so,
*** 1254,1265 **** const Register Gtmp2 = G1_scratch; // 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()); const Register Glocals_size = G3; --- 1254,1263 ----
*** 1307,1318 **** init_value = G0; Label clear_loop; // NOTE: If you change the frame layout, this code will need to // be updated! ! __ lduh( size_of_locals, O2 ); ! __ lduh( size_of_parameters, O1 ); __ sll( O2, Interpreter::logStackElementSize, O2); __ sll( O1, Interpreter::logStackElementSize, O1 ); __ sub( Llocals, O2, O2 ); __ sub( Llocals, O1, O1 ); --- 1305,1317 ---- init_value = G0; Label clear_loop; // NOTE: If you change the frame layout, this code will need to // be updated! ! __ 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 ); __ sub( Llocals, O1, O1 );
*** 1823,1833 **** const Register Gtmp1 = G3_scratch; 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); __ sll(Gtmp1, Interpreter::logStackElementSize, Gtmp1); __ sub(Llocals, Gtmp1, Gtmp2); __ add(Gtmp2, wordSize, Gtmp2); // Save these arguments __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::popframe_preserve_args), G2_thread, Gtmp1, Gtmp2); --- 1822,1833 ---- const Register Gtmp1 = G3_scratch; const Register Gtmp2 = G1_scratch; // Compute size of arguments for saving when returning to deoptimized caller ! __ 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); // Save these arguments __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::popframe_preserve_args), G2_thread, Gtmp1, Gtmp2);