@@ -1441,8 +1441,9 @@ void frame::describe(FrameValues& values, int frame_no, const RegisterMap* reg_m
1441
1441
}
1442
1442
assert (sig_index == sizeargs, " " );
1443
1443
}
1444
- int out_preserve = SharedRuntime::java_calling_convention (sig_bt, regs, sizeargs);
1445
- assert (out_preserve == m->num_stack_arg_slots (), " " );
1444
+ int stack_arg_slots = SharedRuntime::java_calling_convention (sig_bt, regs, sizeargs);
1445
+ assert (stack_arg_slots == m->num_stack_arg_slots (), " " );
1446
+ int out_preserve = SharedRuntime::out_preserve_stack_slots ();
1446
1447
int sig_index = 0 ;
1447
1448
int arg_index = (m->is_static () ? 0 : -1 );
1448
1449
for (SignatureStream ss (m->signature ()); !ss.at_return_type (); ) {
@@ -1453,7 +1454,7 @@ void frame::describe(FrameValues& values, int frame_no, const RegisterMap* reg_m
1453
1454
VMReg fst = regs[sig_index].first ();
1454
1455
if (fst->is_stack ()) {
1455
1456
assert (((int )fst->reg2stack ()) >= 0 , " reg2stack: " INTPTR_FORMAT, fst->reg2stack ());
1456
- int offset = fst->reg2stack () * VMRegImpl::stack_slot_size + stack_slot_offset;
1457
+ int offset = ( fst->reg2stack () + out_preserve ) * VMRegImpl::stack_slot_size + stack_slot_offset;
1457
1458
intptr_t * stack_address = (intptr_t *)((address)unextended_sp () + offset);
1458
1459
if (at_this) {
1459
1460
values.describe (frame_no, stack_address, err_msg (" this for #%d" , frame_no), 1 );
0 commit comments