summaryrefslogtreecommitdiff
path: root/tnslc/tnslc.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-07-26 00:48:43 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-07-26 00:48:43 -0400
commit7f0e6ea654037eda11c2e84946f99bad3f1ab6e4 (patch)
tree88aae0b23c8cdcaaa4a80daf44f87e1969b71de4 /tnslc/tnslc.tnsl
parentceaeb8df4d9bf9b518239ea623d813add5a71072 (diff)
Division fixes
Diffstat (limited to 'tnslc/tnslc.tnsl')
-rw-r--r--tnslc/tnslc.tnsl9
1 files changed, 6 insertions, 3 deletions
diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl
index 5c1e6f9..772897e 100644
--- a/tnslc/tnslc.tnsl
+++ b/tnslc/tnslc.tnsl
@@ -1258,8 +1258,11 @@
;data`.csec = string_join( {
data`.csec,
"\tmov ", get_reg(0, sz), ", ", self.norm_loc(sz), "\n",
- "\tmov ", get_reg(3, sz), ", ", v.norm_loc(sz), "\n",
- "\t", op, " ", get_reg(3, sz), "\n",
+ "\txor rdx, rdx\n",
+ "\tpush rsi\n",
+ "\tmov ", get_reg(4, sz), ", ", v.norm_loc(sz), "\n",
+ "\t", op, " ", get_reg(4, sz), "\n",
+ "\tpop rsi\n",
"\tmov ", self.norm_loc(sz), ", ", get_reg(keep, sz), "\n"
}, "")
;/
@@ -1784,7 +1787,7 @@
/; new_tmp_var (Type t, ~CompData out) [Variable]
;Variable new = {"##tmp", t, 0, 0}
;new.loc_type = LOCATION.STACK
- ;new.location = self.get_full_tmp_stack() + self.tmp + new.norm_size()
+ ;new.location = self.get_full_tmp_stack() + new.norm_size()
;self.tmp = self.tmp + new.norm_size()
;out`.csec = string_join( {
out`.csec,