Skip to content

Commit b1572f8

Browse files
committed
Revert adding to sp in stackAdjustment case
1 parent d7adaf8 commit b1572f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/jit/codegenriscv64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ void CodeGen::genLclHeap(GenTree* tree)
16251625
// Return the stackalloc'ed address in result register.
16261626
// TargetReg = SP + stackAdjustment.
16271627
//
1628-
genInstrWithConstant(INS_addi, EA_PTRSIZE, targetReg, spSourceReg, (ssize_t)stackAdjustment, tempReg);
1628+
genInstrWithConstant(INS_addi, EA_PTRSIZE, targetReg, REG_SPBASE, (ssize_t)stackAdjustment, tempReg);
16291629
}
16301630
else // stackAdjustment == 0
16311631
{

0 commit comments

Comments
 (0)