src/cpu/x86/vm/templateInterpreter_x86_64.cpp
Print this page
@@ -367,13 +367,10 @@
// On return (i.e. jump to entry_point) [ back to invocation of interpreter ]
// Everything as it was on entry
// rdx is not restored. Doesn't appear to really be set.
- const Address size_of_parameters(rbx,
- Method::size_of_parameters_offset());
-
// InterpreterRuntime::frequency_counter_overflow takes two
// arguments, the first (thread) is passed by call_VM, the second
// indicates if the counter overflow occurs at a backwards branch
// (NULL bcp). We pass zero for it. The call returns the address
// of the verified entry point for the method or NULL if the
@@ -842,19 +839,19 @@
// rbx: Method*
// r13: sender sp
address entry_point = __ pc();
- const Address size_of_parameters(rbx, Method::
- size_of_parameters_offset());
+ const Address constMethod (rbx, Method::const_offset());
const Address invocation_counter(rbx, Method::
invocation_counter_offset() +
InvocationCounter::counter_offset());
const Address access_flags (rbx, Method::access_flags_offset());
// get parameter size (always needed)
- __ load_unsigned_short(rcx, size_of_parameters);
+ __ movptr(rcx, constMethod);
+ __ load_unsigned_short(rcx, Address(rcx, ConstMethod::size_of_parameters_offset()));
// native calls don't need the stack size check since they have no
// expression stack and the arguments are already on the stack and
// we only add a handful of words to the stack
@@ -965,13 +962,14 @@
const Register method = rbx;
const Register t = r11;
// allocate space for parameters
__ get_method(method);
+ __ movptr(t, Address(method, Method::const_offset()));
__ load_unsigned_short(t,
- Address(method,
- Method::size_of_parameters_offset()));
+ Address(t,
+ ConstMethod::size_of_parameters_offset()));
__ shll(t, Interpreter::logStackElementSize);
__ subptr(rsp, t);
__ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
__ andptr(rsp, -16); // must be 16 byte boundary (see amd64 ABI)
@@ -1300,26 +1298,27 @@
// ebx: Method*
// r13: sender sp
address entry_point = __ pc();
- const Address size_of_parameters(rbx,
- Method::size_of_parameters_offset());
- const Address size_of_locals(rbx, Method::size_of_locals_offset());
+ const Address constMethod(rbx, Method::const_offset());
const Address invocation_counter(rbx,
Method::invocation_counter_offset() +
InvocationCounter::counter_offset());
const Address access_flags(rbx, Method::access_flags_offset());
// get parameter size (always needed)
- __ load_unsigned_short(rcx, size_of_parameters);
+ __ movptr(rdx, constMethod);
+ __ load_unsigned_short(rcx, Address(rdx, ConstMethod::size_of_parameters_offset()));
// rbx: Method*
// rcx: size of parameters
// r13: sender_sp (could differ from sp+wordSize if we were called via c2i )
- __ load_unsigned_short(rdx, size_of_locals); // get size of locals in words
+ // get size of locals in words
+ // constMethod is already in rdx
+ __ load_unsigned_short(rdx, Address(rdx, ConstMethod::size_of_locals_offset()));
__ subl(rdx, rcx); // rdx = no. of additional locals
// YYY
// __ incrementl(rdx);
// __ andl(rdx, -2);
@@ -1750,11 +1749,12 @@
__ jcc(Assembler::notZero, caller_not_deoptimized);
// Compute size of arguments for saving when returning to
// deoptimized caller
__ get_method(rax);
- __ load_unsigned_short(rax, Address(rax, in_bytes(Method::
+ __ movptr(rax, Address(rax, Method::const_offset()));
+ __ load_unsigned_short(rax, Address(rax, in_bytes(ConstMethod::
size_of_parameters_offset())));
__ shll(rax, Interpreter::logStackElementSize);
__ restore_locals(); // XXX do we need this?
__ subptr(r14, rax);
__ addptr(r14, wordSize);