1 parent 1a2059f commit 0dfed06Copy full SHA for 0dfed06
1 file changed
src/hotspot/cpu/riscv/riscv.ad
@@ -1365,10 +1365,10 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
1365
st->print("# stack bang size=%d\n\t", framesize);
1366
}
1367
1368
- st->print("sd fp, [sp, #%d]\n\t", - 2 * wordSize);
1369
- st->print("sd ra, [sp, #%d]\n\t", - wordSize);
1370
- if (PreserveFramePointer) { st->print("sub fp, sp, #%d\n\t", 2 * wordSize); }
1371
st->print("sub sp, sp, #%d\n\t", framesize);
+ st->print("sd fp, [sp, #%d]\n\t", framesize - 2 * wordSize);
+ st->print("sd ra, [sp, #%d]\n\t", framesize - wordSize);
+ if (PreserveFramePointer) { st->print("add fp, sp, #%d\n\t", framesize); }
1372
1373
if (VerifyStackAtCalls) {
1374
st->print("mv t2, %ld\n\t", MAJIK_DWORD);
0 commit comments