diff options
Diffstat (limited to 'tnslc/c_wrap.tnsl')
-rw-r--r-- | tnslc/c_wrap.tnsl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tnslc/c_wrap.tnsl b/tnslc/c_wrap.tnsl index d1004bb..93ea3e4 100644 --- a/tnslc/c_wrap.tnsl +++ b/tnslc/c_wrap.tnsl @@ -1,3 +1,7 @@ +asm "extern malloc" +asm "extern realloc" +asm "extern free" + /; _alloc (uint size) [~void] ~void out # Mov size into proper register, and set all extras to zero @@ -8,7 +12,7 @@ asm "mov r8, 0" asm "mov r9, 0" asm "mov r10, 0" - asm "call malloc wrt ..got" + asm "call malloc" # Set out to the returned value # (The compiler assignes spaces sequentially, and we have a uint in r8) asm "mov r9, rax" @@ -26,7 +30,7 @@ asm "mov r9, 0" asm "mov r10, 0" # Do call - asm "call realloc wrt ..got" + asm "call realloc" # Set out to the returned value # (The compiler assignes spaces sequentially. We have a ptr in r8, and a uint in r9) asm "mov r10, rax" @@ -43,7 +47,7 @@ asm "mov r9, 0" asm "mov r10, 0" # do call - asm "call free wrt ..got" + asm "call free" # there's no more to do 'cause free returns nothing ;/ |