Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .text
  2.         .global myexp
  3.  
  4. myexp:
  5.         pushl   %ebp
  6.         movl    %esp, %ebp
  7.  
  8.         movl    $1, %eax
  9.         cvtsi2sd        %eax, %xmm0
  10.         addsd   8(%ebp), %xmm0
  11.         movsd   8(%ebp), %xmm3
  12.  
  13. loop:
  14.         movl    $0, %edx
  15.         cvtsi2sd        %edx, %xmm1
  16.         comisd  %xmm1, %xmm3
  17.         jz      exit
  18.        
  19.         incl    %eax
  20.         cvtsi2sd        %eax, %xmm2
  21.         mulsd   8(%ebp), %xmm3
  22.         divsd   %xmm2, %xmm3
  23.  
  24.         addsd   %xmm3, %xmm0
  25.         jmp     loop
  26.  
  27. exit:
  28.         movl    16(%ebp), %eax
  29.         movsd   %xmm0, (%eax)
  30.         movl    %ebp, %esp
  31.         popl    %ebp
  32.         ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement