Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .globl main
- .section .rodata
- format: .asciz "sin(95.0) = %f\n"
- number: .double 16
- .bss
- a: .space 4
- b: .space 4
- c: .space 4
- .text
- main:
- lea number(%rip), %rax
- movq (%rax), %xmm0
- call fpu_sin
- pushq %rbx
- lea format(%rip), %rdi
- mov $2, %rax
- call printf@plt
- popq %rbx
- ret
- fpu_sin:
- sinsd %xmm0, %xmm0
- fpu_cos:
- cossd %xmm0, %xmm0
- fpu_tan:
- tansd %xmm0, %xmm0
- fpu_sqrt:
- sqrtsd %xmm0, %xmm0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement