< prev index next >
src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp
Print this page
rev 12172 : 8170100: AArch64: Crash in C1-compiled code accessing References
Reviewed-by: duke
@@ -61,11 +61,11 @@
// Size of interpreter code. Increase if too small. Interpreter will
// fail with a guarantee ("not enough space for interpreter generation");
// if too small.
// Run with +PrintInterpreter to get the VM to print out the size.
// Max size with JVMTI
-int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
+int TemplateInterpreter::InterpreterCodeSize = JVMCI_ONLY(268) NOT_JVMCI(256) * 1024;
#define __ _masm->
//-----------------------------------------------------------------------------
@@ -870,11 +870,11 @@
// of java.lang.Reference) and jump to the slow path if null. If the
// Reference object is null then we obviously cannot fetch the referent
// and so we don't need to call the G1 pre-barrier. Thus we can use the
// regular method entry code to generate the NPE.
//
- // This code is based on generate_accessor_enty.
+ // This code is based on generate_accessor_entry.
//
// rmethod: Method*
// r13: senderSP must preserve for slow path, set SP to it on fast path
address entry = __ pc();
@@ -888,15 +888,15 @@
// Check if local 0 != NULL
// If the receiver is null then it is OK to jump to the slow path.
__ ldr(local_0, Address(esp, 0));
__ cbz(local_0, slow_path);
-
// Load the value of the referent field.
const Address field_address(local_0, referent_offset);
__ load_heap_oop(local_0, field_address);
+ __ mov(r19, r13); // Move senderSP to a callee-saved register
// Generate the G1 pre-barrier code to log the value of
// the referent field in an SATB buffer.
__ enter(); // g1_write may call runtime
__ g1_write_barrier_pre(noreg /* obj */,
local_0 /* pre_val */,
@@ -904,11 +904,11 @@
rscratch2 /* tmp */,
true /* tosca_live */,
true /* expand_call */);
__ leave();
// areturn
- __ andr(sp, r13, -16); // done with stack
+ __ andr(sp, r19, -16); // done with stack
__ ret(lr);
// generate a vanilla interpreter entry as the slow path
__ bind(slow_path);
__ jump_to_entry(Interpreter::entry_for_kind(Interpreter::zerolocals));
< prev index next >