Fixed my assembly!!!!

This commit is contained in:
Nicolás A. Ortega 2016-06-10 21:42:38 +02:00
parent a1d2058ed9
commit 8f83ddc038
No known key found for this signature in database
GPG Key ID: 4825F773B8D44EFF

View File

@ -7,12 +7,10 @@ _start:
movq $3, %rsi # second argument
movq $2, %rdi # first argument
call power # call the function
;addq $16, %rsp # move the stack pointer back
pushq %rax # save the first answer on stack
movq $2, %rsi # push the second argument
movq $5, %rdi # push the first argument
call power # call the function
;addq $16, %rsp # move the stack pointer back
popq %rdi # the second answer is still in %rax,
# so we can put the first one from the