Exit the program with the accumulator as the code on completion
This commit is contained in:
parent
d2a3c50935
commit
febdd862e8
3 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
|
||||||
}
|
}
|
||||||
|
|
||||||
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
||||||
|
+ "li a7,93\n"
|
||||||
|
+ "ecall\n"
|
||||||
+ builder.toString();
|
+ builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
|
||||||
}
|
}
|
||||||
|
|
||||||
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
||||||
|
+ "li a7,93\n"
|
||||||
|
+ "ecall\n"
|
||||||
+ builder.toString();
|
+ builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ public class CodegenImpl implements Codegen {
|
||||||
}
|
}
|
||||||
|
|
||||||
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
return "call " + String.format("%s_%d\n", main.id, main.numOfArgs)
|
||||||
|
+ "li a7,93\n"
|
||||||
|
+ "ecall\n"
|
||||||
+ builder.toString();
|
+ builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue