src/cpu/x86/vm/templateInterpreter_x86_32.cpp
Print this page
@@ -422,12 +422,10 @@
// rsp - sender_sp
// C++ interpreter only
// rsi - previous interpreter state pointer
- const Address size_of_parameters(rbx, Method::size_of_parameters_offset());
-
// InterpreterRuntime::frequency_counter_overflow takes one argument
// indicating if the counter overflow occurs at a backwards branch (non-NULL bcp).
// The call returns the address of the verified entry point for the method or NULL
// if the compilation did not complete (either went background or bailed out).
__ movptr(rax, (intptr_t)false);
@@ -866,16 +864,17 @@
// rbx,: Method*
// rsi: sender sp
// rsi: previous interpreter state (C++ interpreter) must preserve
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());
+ const Address size_of_parameters(rcx, ConstMethod::size_of_parameters_offset());
// get parameter size (always needed)
+ __ movptr(rcx, constMethod);
__ load_unsigned_short(rcx, size_of_parameters);
// 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
@@ -986,11 +985,13 @@
const Register thread = rdi;
const Register t = rcx;
// allocate space for parameters
__ get_method(method);
- __ load_unsigned_short(t, Address(method, Method::size_of_parameters_offset()));
+ __ movptr(t, Address(method, Method::const_offset()));
+ __ load_unsigned_short(t, Address(t, ConstMethod::size_of_parameters_offset()));
+
__ shlptr(t, Interpreter::logStackElementSize);
__ addptr(t, 2*wordSize); // allocate two more slots for JNIEnv and possible mirror
__ subptr(rsp, t);
__ andptr(rsp, -(StackAlignmentInBytes)); // gcc needs 16 byte aligned stacks to do XMM intrinsics
@@ -1295,17 +1296,18 @@
// rbx,: Method*
// rsi: 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());
+ const Address size_of_parameters(rdx, ConstMethod::size_of_parameters_offset());
+ const Address size_of_locals (rdx, ConstMethod::size_of_locals_offset());
// get parameter size (always needed)
+ __ movptr(rdx, constMethod);
__ load_unsigned_short(rcx, size_of_parameters);
// rbx,: Method*
// rcx: size of parameters
@@ -1732,11 +1734,12 @@
__ testl(rax, rax);
__ 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::size_of_parameters_offset())));
+ __ movptr(rax, Address(rax, Method::const_offset()));
+ __ load_unsigned_short(rax, Address(rax, ConstMethod::size_of_parameters_offset()));
__ shlptr(rax, Interpreter::logStackElementSize);
__ restore_locals();
__ subptr(rdi, rax);
__ addptr(rdi, wordSize);
// Save these arguments