match ir {
IR::StringDef(string_label, some_string) => {
string_table.insert(some_string.clone(), string_label);
- self.label(string_label);
+ self.label(format!("{}:", string_label));
self.line(format!(".asciz \"{}\"", some_string)); // should this be .asciz?
self.label("");
},
IR::Load => {
self.label("# load 64");
self.copy_top_stack_value_to("t0");
- self.line(format!("ld {}, 0({})", "t0", "t0")); // deref pointer int t0 to t0
+ self.line("ld t0, 0(t0)"); // deref pointer in t0 to t0
self.copy_to_top_of_stack("t0");
},
IR::Store => { // ( x addr -- )
},
IR::StackPushString(name) => {
self.label(format!("# stackpushstring {}", name));
- self.line(format!("li t0, {}", name));
+ self.line(format!("la t0, {}", name));
self.push_from("t0");
},
IR::AddU64 => {