diff --git a/task1/CodegenImpl.java b/task1/CodegenImpl.java index bcee1be..6dbd11f 100644 --- a/task1/CodegenImpl.java +++ b/task1/CodegenImpl.java @@ -131,7 +131,7 @@ public class CodegenImpl implements Codegen { Assign assign = (Assign) e; return compileExp(assign.e) - + String.format("sw a0,%d(s0)", assign.x * 4); + + String.format("sw a0,%d(s0)\n", assign.x * 4); } else if (e instanceof Continue) { return "jr s2\n"; } else if (e instanceof Break) { diff --git a/task2/CodegenImpl.java b/task2/CodegenImpl.java index bcee1be..6dbd11f 100644 --- a/task2/CodegenImpl.java +++ b/task2/CodegenImpl.java @@ -131,7 +131,7 @@ public class CodegenImpl implements Codegen { Assign assign = (Assign) e; return compileExp(assign.e) - + String.format("sw a0,%d(s0)", assign.x * 4); + + String.format("sw a0,%d(s0)\n", assign.x * 4); } else if (e instanceof Continue) { return "jr s2\n"; } else if (e instanceof Break) { diff --git a/task3/CodegenImpl.java b/task3/CodegenImpl.java index bcee1be..6dbd11f 100644 --- a/task3/CodegenImpl.java +++ b/task3/CodegenImpl.java @@ -131,7 +131,7 @@ public class CodegenImpl implements Codegen { Assign assign = (Assign) e; return compileExp(assign.e) - + String.format("sw a0,%d(s0)", assign.x * 4); + + String.format("sw a0,%d(s0)\n", assign.x * 4); } else if (e instanceof Continue) { return "jr s2\n"; } else if (e instanceof Break) {