summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tnslc/simple.tnsl6
-rw-r--r--tnslc/tnslc.tnsl3
2 files changed, 6 insertions, 3 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl
index 9e0f700..20348c1 100644
--- a/tnslc/simple.tnsl
+++ b/tnslc/simple.tnsl
@@ -11,8 +11,8 @@ struct Test {
int i, j, k
}
-/; call_me (int i) [int]
- return i + 1
+/; call_me (int i, j) [int]
+ return i + j
;/
/; main (int argc, ~~uint argv) [int]
@@ -35,7 +35,7 @@ struct Test {
argc = 90
;/
- m.j = call_me(m.j)
+ m.j = call_me(m.j, argc)
# return 3
return m.j
diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl
index a91d273..05cbe03 100644
--- a/tnslc/tnslc.tnsl
+++ b/tnslc/tnslc.tnsl
@@ -2609,6 +2609,7 @@
"\tsub rsp, ", int_to_string(ctmp.norm_size()), "\n"
}, "")
;ctmp.set(val, out)
+ ;start = _param_end(tok, start) + 1
;; else
;regs++
;/
@@ -2638,6 +2639,7 @@
}, "")
;ctmp.set(val, out)
;regs++
+ ;start = _param_end(tok, start) + 1
;; else if (regs == 6)
;break
;/
@@ -2664,6 +2666,7 @@
"\tmov ", get_reg(reg, ctmp.norm_size()),", [rsp]\n",
"\tadd rsp, ", int_to_string(ctmp.norm_size()), "\n"
}, "")
+ ;reg++
;; else if (reg == 6)
;break
;/