private void endMethod() { endMethod(endOfMethod); }
private void endMethod(int lastAddr) {
if(startOfMethod == 0) return;
- // FEATURE: We should be able to use if(!unreachable) here (i think)
+ // We should be able to use if(!unreachable) here (i think)
// This isn't strictly necessary; its just here to work around unreachable code errors
p("case " + toHex(lastAddr) + ":");
indent++;
break;
case 12: // SYSCALL
p("pc = " + toHex(pc) + ";");
- p( "r"+V0+" = syscall(r"+V0+",r"+A0+",r"+A1+",r"+A2+",r"+A3+");");
+ p( "r"+V0+" = syscall(r"+V0+",r"+A0+",r"+A1+",r"+A2+",r"+A3+",r"+T0+",r"+T1+");");
p("if (state != RUNNING) {");
indent++;
p("pc = " + toHex(pc+4) + ";");