codegen almost finished

This commit is contained in:
Lorenzo Torres 2026-01-16 23:26:28 +01:00
parent ed0ad1d095
commit 870cf8f0b4
15 changed files with 523 additions and 126 deletions

20
test.s
View file

@ -1,20 +0,0 @@
.section .text
.global main
main:
push %rbp
mov %rsp, %rbp
sub $256, %rsp
mov $2, %rax
mov %eax, -8(%rbp)
mov $1, %rax
mov %eax, -12(%rbp)
mov -12(%rbp), %rax
mov %rax, %rcx
mov $2, %rax
add %rcx, %rax
mov %rbp, %rsp
pop %rbp
ret
mov %rbp, %rsp
pop %rbp
ret