readme.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. create testfiles in shell (linux):
  2. for i in `ls /tmp/avx/*.pp`; do /home/torsten/fpc/avx/ppcx64 -Fu/home/torsten/fpc/avx/rtl/units/x86_64-linux/ "$i"; done;
  3. On windows, complete testing would look like:
  4. i386:
  5. mkdir tmp
  6. fpc avxtestgenerator
  7. fpc avxtestfilecmp
  8. avxtestgenerator -ffpc -otmp
  9. cd tmp
  10. for %%p in (*.pp) do call fpc %%p -v0
  11. cd ..
  12. avxtestgenerator -fnasm -otmp
  13. cd tmp
  14. for %%a in (*.asm) do nasm -fwin32 %%a
  15. cd ..
  16. avxtestfilecmp -mtmp\*.obj -dtmp -eexe -s
  17. x86_64:
  18. fpc avxtestgenerator
  19. fpc avxtestfilecmp
  20. avxtestgenerator -px8664 -ffpc -otmp
  21. cd tmp
  22. for %%p in (*.pp) do call fpc -Px86_64 %%p -v0
  23. cd ..
  24. avxtestgenerator -px8664 -fnasm -otmp
  25. cd tmp
  26. for %%a in (*.asm) do nasm -fwin64 %%a
  27. cd ..
  28. avxtestfilecmp -mtmp\*.obj -dtmp -eexe -s
  29. ****************************************************************************************************
  30. Note:
  31. While avxtestgenerator supports FASM output, testing with FASM does not work because
  32. FASM assembles slightly different from FPC, e.g. it swaps base and index register
  33. in references if this is benefical (e.g. [rbp+rax] => [rax+rbp] saves one byte).
  34. ****************************************************************************************************
  35. compare binary-files:
  36. any instructions can have a different binary-streams
  37. e.g.
  38. VMOVAPD XMM0, XMM1:
  39. possible binary-codes:
  40. VMOVAPD xmm1, xmm2/m128 [VEX.128.66.0F.28 /r]
  41. VMOVAPD xmm2/m128, xmm1 [VEX.128.66.0F.29 /r]
  42. VMOVSD XMM1, XMM2, XMM3
  43. possible binary-codes:
  44. VMOVSD xmm1, xmm2, xmm3 [VEX.NDS.LIG.F2.0F.WIG.10 /r] operand encoding: RVM
  45. VMOVSD xmm1, xmm2, xmm3 [VEX.NDS.LIG.F2.0F.WIG.11 /r] operand encoding: MVR
  46. currently (AVX I):
  47. VMOVAPD
  48. VMOVAPS
  49. VMOVDQA
  50. VMOVDQU
  51. VMOVQ
  52. VMOVSD
  53. VMOVSS
  54. VMOVUPD
  55. VMOVUPS