diff options
Diffstat (limited to 'tnslc/compile/isa_x86.tnsl')
-rw-r--r-- | tnslc/compile/isa_x86.tnsl | 16 |
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') +;/ |