Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax noprefix
- .text
- .global my_sin
- my_sin:
- push ebp
- mov ebp, esp
- push ebx
- movsd xmm0, [ebp + 8]
- mov eax, 0
- cvtsi2sd xmm4, eax
- mov eax, 1
- mov ebx, 1
- movsd xmm2, xmm0
- Loop:
- movsd xmm6, xmm4
- addsd xmm4, xmm2
- mulsd xmm2, xmm0
- mulsd xmm2, xmm0
- inc eax
- cvtsi2sd xmm1, eax
- divsd xmm2, xmm1
- inc eax
- cvtsi2sd xmm1, eax
- divsd xmm2, xmm1
- imul ebx, -1
- cvtsi2sd xmm1, ebx
- mulsd xmm2, xmm1
- comisd xmm4, xmm6
- jne Loop
- sub esp, 8
- movsd [esp], xmm4
- fld qword ptr [esp]
- add esp, 8
- pop ebx
- mov esp, ebp
- pop ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement