codegen almost finished
This commit is contained in:
parent
ed0ad1d095
commit
870cf8f0b4
15 changed files with 523 additions and 126 deletions
20
test.s
20
test.s
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue