diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-05-07 19:16:48 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-05-07 19:16:48 -0600 |
commit | e4f89099939c9f61818ecff2d3ca48580f461e61 (patch) | |
tree | 5bcaf7438f37bf14d860d55a56bc6049b4c6cdaf /condense/CondenseVisitor.java | |
parent | aaafaee0d5f8eafff3680f5443e6e8a66d7a2545 (diff) |
Condense all tests passed
Diffstat (limited to 'condense/CondenseVisitor.java')
-rw-r--r-- | condense/CondenseVisitor.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/condense/CondenseVisitor.java b/condense/CondenseVisitor.java index 3ded2e8..436ddfa 100644 --- a/condense/CondenseVisitor.java +++ b/condense/CondenseVisitor.java @@ -178,15 +178,15 @@ public class CondenseVisitor extends VInstr.Visitor<RuntimeException>{ } if (op.equals("Add")) - ret += " add"; + ret += " addu"; else if (op.equals("Sub")) - ret += " sub"; + ret += " subu"; else if (op.equals("MulS")) ret += " mul"; else if (op.equals("Eq")) - ret += " and"; + ret += " seq"; else if (op.equals("Lt")) - ret += " slt"; + ret += " sltu"; else if (op.equals("LtS")) ret += " slt"; else if (op.equals("PrintIntS")) { @@ -287,9 +287,9 @@ public class CondenseVisitor extends VInstr.Visitor<RuntimeException>{ /////////////////////////////////////////////////////////////// String ret = " "; if (n.positive) - ret += "bnez "; + ret += "bgtz "; else - ret += "beqz "; + ret += "blez "; ret += n.value.toString() + " "; |