Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. .intel_syntax noprefix
  2. .global fib
  3.  
  4. fib:
  5. cmp rdi, 1
  6. jg L1
  7. mov rax, rdi
  8. ret
  9. L1:
  10. sub rdi, 1
  11. push rdi
  12. call fib
  13. mov rsi, rax
  14. pop rdi
  15. push rsi
  16. sub rdi, 1
  17. call fib
  18. pop rsi
  19. add rax, rsi
  20. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement