summaryrefslogtreecommitdiff
path: root/condense/CondenseVisitor.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-05-07 15:03:44 -0600
committerbd-912 <bdunahu@colostate.edu>2024-05-07 15:03:44 -0600
commit8f57dce451257c2260f5a3512e6fe90d575b929a (patch)
tree83e1e14792e2a2c86c96d20da7c576e685546fa2 /condense/CondenseVisitor.java
parent3aebefa92757992276d91043086f5b9e50e449ca (diff)
Some additional broken VBuiltIn additions to Condense
Diffstat (limited to 'condense/CondenseVisitor.java')
-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",