newer version of tcc almost working

This commit is contained in:
pommicket 2022-02-18 12:36:57 -05:00
parent c42c5d94b8
commit 826d1afd58
442 changed files with 90400 additions and 24506 deletions

21
05/test.s Normal file
View file

@ -0,0 +1,21 @@
.global _start
.global __syscall
__syscall:
# SysV calling convention: RDI, RSI, RDX, RCX, R8, R9, 8(%rsp)
# Linux syscall calling convention: RAX, RDI, RSI, RDX, R10, R8, R9
mov %rdi, %rax
mov %rsi, %rdi
mov %rdx, %rsi
mov %rcx, %rdx
mov %r8, %r10
mov %r9, %r8
mov 8(%rsp), %r9
syscall
ret
_start:
lea __syscall, %rdi
call main
mov $60, %eax
syscall