Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. .globl main
  2. .section .rodata
  3. format: .asciz "sin(95.0) = %f\n"
  4. number: .double 16
  5. .bss
  6. a: .space 4
  7. b: .space 4
  8. c: .space 4
  9. .text
  10. main:
  11. lea number(%rip), %rax
  12. movq (%rax), %xmm0
  13. call fpu_sin
  14. pushq %rbx
  15. lea format(%rip), %rdi
  16. mov $2, %rax
  17. call printf@plt
  18. popq %rbx
  19. ret
  20. fpu_sin:
  21. sinsd %xmm0, %xmm0
  22. fpu_cos:
  23. cossd %xmm0, %xmm0
  24. fpu_tan:
  25. tansd %xmm0, %xmm0
  26. fpu_sqrt:
  27. sqrtsd %xmm0, %xmm0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement