codegen
This commit is contained in:
parent
09d6cf4b46
commit
ed0ad1d095
14 changed files with 846 additions and 897 deletions
20
test.s
Normal file
20
test.s
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.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