summaryrefslogtreecommitdiff
path: root/tnslc/compile/isa_x86.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-10-14 01:21:12 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-10-14 01:21:12 -0400
commit01d6580a17d5dc00b84cc3e72e0a86b090c1c6bd (patch)
tree0e023e9fac2f030037a3ddce6da0db6d675fad48 /tnslc/compile/isa_x86.tnsl
parent0d2c569ed2e408d0c1cbac7f170f4e281601eb24 (diff)
Start to fill out compile_statement more
Diffstat (limited to 'tnslc/compile/isa_x86.tnsl')
-rw-r--r--tnslc/compile/isa_x86.tnsl16
1 files changed, 12 insertions, 4 deletions
diff --git a/tnslc/compile/isa_x86.tnsl b/tnslc/compile/isa_x86.tnsl
index 0ab8910..e342c90 100644
--- a/tnslc/compile/isa_x86.tnsl
+++ b/tnslc/compile/isa_x86.tnsl
@@ -62,7 +62,7 @@
;return tmp
;/
-/; header_guard [{}charp]
+/; header_guard (~{}charp csec) [{}charp]
;{}charp out = "", tmp = ""
;tmp = push_asm("%r8")
;add_strings(~out, ~tmp)
@@ -80,10 +80,10 @@
;add_strings(~out, ~tmp)
;tmp = push_asm("%r15")
;add_strings(~out, ~tmp)
- ;return out
+ ;add_strings(csec, ~out)
;/
-/; tail_guard [{}charp]
+/; tail_guard (~{}charp csec) [{}charp]
;{}charp out = "", tmp = ""
;tmp = pop_asm("%r15")
;add_strings(~out, ~tmp)
@@ -101,7 +101,7 @@
;add_strings(~out, ~tmp)
;tmp = pop_asm("%r8")
;add_strings(~out, ~tmp)
- ;return out
+ ;add_strings(csec, ~out)
;/
/# Accepted common names:
@@ -158,3 +158,11 @@
;return out
;/
+
+/; make_label ({}charp func_name, func_place, ~{}charp csec)
+ ;func_name.append("_")
+ ;add_strings(~func_name, ~func_place)
+ ;add_strings(csec, ~func_name)
+ ;csec`.append(':')
+ ;csec`.append('\n')
+;/