Advertisement
Guest User

Untitled

a guest
Feb 7th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .text
  2.         .global dot_product
  3. dot_product:
  4.         pushl   %ebp
  5.         movl    %esp, %ebp
  6.         pushl   %edi
  7.         pushl   %esi
  8.  
  9.         movl    8(%ebp), %eax
  10.         movl    12(%ebp), %edi
  11.         movl    16(%ebp), %esi
  12.  
  13.         movups  (%esi), %xmm0
  14.  
  15.  
  16.  
  17.  
  18. loopa:
  19.         movups  (%edi), xmm1
  20.         movups  (%esi), xmm2
  21.         mulps   xmm1, xmm2
  22.         addps   xmm2, xmm0
  23.  
  24.         incl    %edi
  25.         incl    %esi
  26.  
  27.         subl    $1, %eax
  28.         cmpl    $0, %eax
  29.         jne     loopa
  30.  
  31.  
  32.         subl    $8, %esp
  33.         movss  %xmm0, (%esp)
  34.         fld   (%esp)
  35.         addl     $8, %esp
  36.  
  37.         popl    %esi
  38. -- INSERT --                                       32,1          Top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement