Minor correction

master
Apoorva Ranade 4 years ago
parent 4fa4a92e1f
commit 0b00c3fc1d

@ -739,7 +739,7 @@ public class CodeGenImpl extends CodeGenBase
sp_off -= 2;
backend.emitADDI(SP, FP, -sp_off*wordSize, "restore sp");
}
if(operator.equals("!="))
else if(operator.equals("!="))
{
incSp(2);
backend.emitSW(node.left.dispatch(this), FP, (1 - sp_off) *wordSize, "Push argument 0 from last.");
@ -755,7 +755,7 @@ public class CodeGenImpl extends CodeGenBase
backend.emitSW(node.left.dispatch(this), FP, (1 - sp_off) *wordSize, "Push argument 0 from last.");
backend.emitSW(node.right.dispatch(this), FP, ( - sp_off) *wordSize, "Push argument 1 from last.");
backend.emitADDI(SP, FP, -sp_off * wordSize, "Set SP to last argument.");
backend.emitJAL(concatLabel, "Invoke method:concat");
backend.emitJAL(strcatLabel, "Invoke method:strcat");
sp_off -= 2;
backend.emitADDI(SP, FP, -sp_off*wordSize, "restore sp");
}

Loading…
Cancel
Save