compiler-design-excercises/test/var_add.c0.expected

17 lines
285 B
Text

.global main
.global _main
.text
main:
call _main
# move the return value into the first argument for the syscall
movq %rax, %rdi
# move the exit syscall number into rax
movq $0x3C, %rax
syscall
_main:
# your generated code here
mov $1,%0
mov $2,%1
add %0,%1
mov %0,%eax
ret