summaryrefslogtreecommitdiff
path: root/condense
diff options
context:
space:
mode:
Diffstat (limited to 'condense')
-rw-r--r--condense/CondenseVisitor.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/condense/CondenseVisitor.java b/condense/CondenseVisitor.java
index b296f4c..0894a9f 100644
--- a/condense/CondenseVisitor.java
+++ b/condense/CondenseVisitor.java
@@ -151,7 +151,7 @@ public class CondenseVisitor extends VInstr.Visitor<RuntimeException>{
///////////////////////////////////////////////////////////////
// treat the arguments (place all in temp registers)
- String[] ts = new String[] { "$t9", "$v1"};
+ String[] ts = new String[] { "$a0", "$t9"};
for (int i = 0; i < n.args.length; ++i) {
if (this.isNumeric(n.args[i].toString()))
this.addMIPS(String.format(" li %s %s",
@@ -176,16 +176,16 @@ public class CondenseVisitor extends VInstr.Visitor<RuntimeException>{
else if (op.equals("Lt"))
;
else if (op.equals("LtS"))
- ;
+ ret += " slti";
else if (op.equals("PrintIntS"))
- ;
+ ret += " jal _print";
else if (op.equals("HeapAllocZ"))
- ;
+ ret += " jal _heapAlloc";
else if (op.equals("Error"))
- ;
+ ret += " la $a0 _str0\n j _error";
if (n.dest != null)
- ret += String.format(" %s",
+ ret += String.format(" $%s",
((VVarRef.Register) n.dest).ident);
for (int i = 0; i < n.args.length; ++i)
ret += String.format(" %s",