Advertisement
pasholnahuy

HELLO ROMA

Dec 26th, 2023 (edited)
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text
  2. .global computation
  3. computation:
  4.     push %ebp
  5.     mov %esp, %ebp
  6.     mov 8(%esp), %eax
  7.     mov 12(%esp), %ecx
  8.     mov 16(%esp), %edx
  9.     push %esi
  10.     xor %esi, %esi
  11.     movups (%eax, %esi, 4), %xmm1
  12.     add $4, %esi
  13.  
  14. iter:
  15.     cmp %ecx, %esi
  16.     je call_finish
  17.     movups (%eax, %esi, 4), %xmm0
  18.     mulps %xmm0, %xmm1
  19.     add $4, %esi
  20.     jmp iter
  21.  
  22. call_finish:
  23.     pop %esi
  24.     haddps %xmm1, %xmm1
  25.     haddps %xmm1, %xmm1
  26.     movss %xmm1, (%edx)
  27.     mov %ebp, %esp
  28.     pop %ebp
  29.     xor %eax, %eax
  30.     ret
  31.  
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement