8303153: Native interpreter frame missing mirror

Reviewed-by: coleenp, fyang
This commit is contained in:
Fredrik Bredberg 2023-05-08 14:44:54 +00:00 committed by Coleen Phillimore
parent 4b02956d42
commit 5a259d875e
2 changed files with 5 additions and 5 deletions

View File

@ -884,7 +884,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
// Make sure there is room for the exception oop pushed in case method throws
// an exception (see TemplateInterpreterGenerator::generate_throw_exception())
__ sub(rscratch1, sp, 2 * wordSize);
__ stp(zr, rscratch1, Address(sp, 4 * wordSize));
__ stp(r10, rscratch1, Address(sp, 4 * wordSize));
__ mov(sp, rscratch1);
}
}

View File

@ -770,8 +770,10 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ sd(x19_sender_sp, Address(sp, 9 * wordSize));
__ sd(zr, Address(sp, 8 * wordSize));
// Get mirror
// Get mirror and store it in the frame as GC root for this Method*
__ load_mirror(t2, xmethod, x15, t1);
__ sd(t2, Address(sp, 4 * wordSize));
if (!native_call) {
__ ld(t0, Address(xmethod, Method::const_offset()));
__ lhu(t0, Address(t0, ConstMethod::max_stack_offset()));
@ -779,9 +781,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ slli(t0, t0, 3);
__ sub(t0, sp, t0);
__ andi(t0, t0, -16);
// Store extended SP and mirror
// Store extended SP
__ sd(t0, Address(sp, 5 * wordSize));
__ sd(t2, Address(sp, 4 * wordSize));
// Move SP out of the way
__ mv(sp, t0);
} else {
@ -789,7 +790,6 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
// an exception (see TemplateInterpreterGenerator::generate_throw_exception())
__ sub(t0, sp, 2 * wordSize);
__ sd(t0, Address(sp, 5 * wordSize));
__ sd(zr, Address(sp, 4 * wordSize));
__ mv(sp, t0);
}
}