Skip to content

Commit

Permalink
[RISCV] Handle big frame
Browse files Browse the repository at this point in the history
  • Loading branch information
XChy committed Jun 28, 2024
1 parent 8e6f257 commit 198be67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nnvm/Backend/RISCV/StackAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void StackAllocator::emitPrologue(LIRBuilder &builder, LIRFunc &func) {
builder.setInsertPoint(bodyBegin);
loadRegPlusConstantToReg(builder, builder.phyReg(SP),
LIRConst::createInt(-frameSize, LIRValueType::i64),
builder.phyReg(SP), builder.phyReg(A0));
builder.phyReg(SP), builder.phyReg(T0));

for (StackSlot *slot : func.getStackSlots()) {
if (slot->getType() == StackSlot::CalleeSaved) {
Expand All @@ -166,6 +166,6 @@ void StackAllocator::emitEpilogue(LIRBuilder &builder, LIRFunc &func) {

loadRegPlusConstantToReg(builder, builder.phyReg(SP),
LIRConst::createInt(frameSize, LIRValueType::i64),
builder.phyReg(SP), builder.phyReg(A0));
builder.phyReg(SP), builder.phyReg(T0));
}
}

0 comments on commit 198be67

Please sign in to comment.