2
0

testsse2.pp 765 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. { %OPT=-OaVARMAX=16 -OaVARMIN=16 }
  2. { %CPU=i386 }
  3. uses
  4. mmx;
  5. { only a small test to see if it works in principle }
  6. var
  7. b : byte;
  8. q : array[0..15] of byte;
  9. begin
  10. if is_sse2_cpu then
  11. asm
  12. {$ifdef FPC_PIC}
  13. call .LPIC
  14. .LPIC:
  15. popl %ecx
  16. {$ifdef darwin}
  17. movdqa %xmm1,%xmm2
  18. movdqa q-.LPIC(%ecx),%xmm4
  19. psubq %xmm1,%xmm2
  20. psubq q-.LPIC(%ecx),%xmm4
  21. {$else darwin}
  22. addl $_GLOBAL_OFFSET_TABLE_,%ecx
  23. movdqa %xmm1,%xmm2
  24. movdqa q@GOT(%ecx),%xmm4
  25. psubq %xmm1,%xmm2
  26. psubq q@GOT(%ecx),%xmm4
  27. {$endif darwin}
  28. {$else FPC_PIC}
  29. movdqa %xmm1,%xmm2
  30. movdqa q,%xmm4
  31. psubq %xmm1,%xmm2
  32. psubq q,%xmm4
  33. {$endif FPC_PIC}
  34. end;
  35. end.