Skip to content
Snippets Groups Projects
Verified Commit 24ef9eb3 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

Fix some error because of emitPush

parent 27a44967
No related branches found
No related tags found
No related merge requests found
......@@ -316,6 +316,7 @@ public class CodeGenImpl extends CodeGenBase {
@Override
public Void analyze(AssignStmt node) {
backend.emitADDI(SP, SP, -4, "Increment stack ptr by 1 for Condition");
node.value.dispatch(this);
RiscVBackend.Register tmpReg = /*regMgr.borrowOneTmp()*/ T6;
RiscVBackend.Register tmpReg2 = /*regMgr.borrowOneTmp()*/ T5;
......@@ -371,6 +372,7 @@ public class CodeGenImpl extends CodeGenBase {
@Override
public Void analyze(IfStmt node) {
backend.emitADDI(SP, SP, -4, "Increment stack ptr by 1 for Condition");
node.condition.dispatch(this);
RiscVBackend.Register tmpReg = /*regMgr.borrowTmp()*/ T6;
betterBackend.emitPop(tmpReg, "IfStmt: Get condition");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment