1.1 --- a/src/cpu/x86/vm/cppInterpreter_x86.cpp Fri Dec 07 10:55:16 2012 -0800 1.2 +++ b/src/cpu/x86/vm/cppInterpreter_x86.cpp Tue Dec 11 12:41:31 2012 -0500 1.3 @@ -611,8 +611,6 @@ 1.4 // C++ interpreter only 1.5 // rsi/r13 - previous interpreter state pointer 1.6 1.7 - const Address size_of_parameters(rbx, Method::size_of_parameters_offset()); 1.8 - 1.9 // InterpreterRuntime::frequency_counter_overflow takes one argument 1.10 // indicating if the counter overflow occurs at a backwards branch (non-NULL bcp). 1.11 // The call returns the address of the verified entry point for the method or NULL 1.12 @@ -977,15 +975,16 @@ 1.13 // to save/restore. 1.14 address entry_point = __ pc(); 1.15 1.16 - const Address size_of_parameters(rbx, Method::size_of_parameters_offset()); 1.17 - const Address size_of_locals (rbx, Method::size_of_locals_offset()); 1.18 + const Address constMethod (rbx, Method::const_offset()); 1.19 const Address invocation_counter(rbx, Method::invocation_counter_offset() + InvocationCounter::counter_offset()); 1.20 const Address access_flags (rbx, Method::access_flags_offset()); 1.21 + const Address size_of_parameters(rcx, ConstMethod::size_of_parameters_offset()); 1.22 1.23 // rsi/r13 == state/locals rdi == prevstate 1.24 const Register locals = rdi; 1.25 1.26 // get parameter size (always needed) 1.27 + __ movptr(rcx, constMethod); 1.28 __ load_unsigned_short(rcx, size_of_parameters); 1.29 1.30 // rbx: Method* 1.31 @@ -994,6 +993,7 @@ 1.32 // for natives the size of locals is zero 1.33 1.34 // compute beginning of parameters /locals 1.35 + 1.36 __ lea(locals, Address(rsp, rcx, Address::times_ptr, -wordSize)); 1.37 1.38 // initialize fixed part of activation frame 1.39 @@ -1107,11 +1107,14 @@ 1.40 const Register method = rbx; 1.41 const Register thread = LP64_ONLY(r15_thread) NOT_LP64(rdi); 1.42 const Register t = InterpreterRuntime::SignatureHandlerGenerator::temp(); // rcx|rscratch1 1.43 + const Address constMethod (method, Method::const_offset()); 1.44 + const Address size_of_parameters(t, ConstMethod::size_of_parameters_offset()); 1.45 1.46 // allocate space for parameters 1.47 __ movptr(method, STATE(_method)); 1.48 __ verify_method_ptr(method); 1.49 - __ load_unsigned_short(t, Address(method, Method::size_of_parameters_offset())); 1.50 + __ movptr(t, constMethod); 1.51 + __ load_unsigned_short(t, size_of_parameters); 1.52 __ shll(t, 2); 1.53 #ifdef _LP64 1.54 __ subptr(rsp, t); 1.55 @@ -1700,15 +1703,17 @@ 1.56 // save sender sp 1.57 __ push(rcx); 1.58 1.59 - const Address size_of_parameters(rbx, Method::size_of_parameters_offset()); 1.60 - const Address size_of_locals (rbx, Method::size_of_locals_offset()); 1.61 + const Address constMethod (rbx, Method::const_offset()); 1.62 const Address access_flags (rbx, Method::access_flags_offset()); 1.63 + const Address size_of_parameters(rdx, ConstMethod::size_of_parameters_offset()); 1.64 + const Address size_of_locals (rdx, ConstMethod::size_of_locals_offset()); 1.65 1.66 // const Address monitor_block_top (rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize); 1.67 // const Address monitor_block_bot (rbp, frame::interpreter_frame_initial_sp_offset * wordSize); 1.68 // const Address monitor(rbp, frame::interpreter_frame_initial_sp_offset * wordSize - (int)sizeof(BasicObjectLock)); 1.69 1.70 // get parameter size (always needed) 1.71 + __ movptr(rdx, constMethod); 1.72 __ load_unsigned_short(rcx, size_of_parameters); 1.73 1.74 // rbx: Method* 1.75 @@ -1989,7 +1994,9 @@ 1.76 __ movptr(rbx, STATE(_result._to_call._callee)); 1.77 1.78 // callee left args on top of expression stack, remove them 1.79 - __ load_unsigned_short(rcx, Address(rbx, Method::size_of_parameters_offset())); 1.80 + __ movptr(rcx, constMethod); 1.81 + __ load_unsigned_short(rcx, Address(rcx, ConstMethod::size_of_parameters_offset())); 1.82 + 1.83 __ lea(rsp, Address(rsp, rcx, Address::times_ptr)); 1.84 1.85 __ movl(rcx, Address(rbx, Method::result_index_offset())); 1.86 @@ -2159,7 +2166,9 @@ 1.87 // Make it look like call_stub calling conventions 1.88 1.89 // Get (potential) receiver 1.90 - __ load_unsigned_short(rcx, size_of_parameters); // get size of parameters in words 1.91 + // get size of parameters in words 1.92 + __ movptr(rcx, constMethod); 1.93 + __ load_unsigned_short(rcx, Address(rcx, ConstMethod::size_of_parameters_offset())); 1.94 1.95 ExternalAddress recursive(CAST_FROM_FN_PTR(address, RecursiveInterpreterActivation)); 1.96 __ pushptr(recursive.addr()); // make it look good in the debugger