Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global computation
- computation:
- push %ebp
- mov %esp, %ebp
- mov 8(%esp), %eax
- mov 12(%esp), %ecx
- mov 16(%esp), %edx
- push %esi
- xor %esi, %esi
- movups (%eax, %esi, 4), %xmm1
- add $4, %esi
- iter:
- cmp %ecx, %esi
- je call_finish
- movups (%eax, %esi, 4), %xmm0
- mulps %xmm0, %xmm1
- add $4, %esi
- jmp iter
- call_finish:
- pop %esi
- haddps %xmm1, %xmm1
- haddps %xmm1, %xmm1
- movss %xmm1, (%edx)
- mov %ebp, %esp
- pop %ebp
- xor %eax, %eax
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement