avxtestgenerator.pp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {
  2. Copyright (C) <avx-testfile-generator> <Torsten Grundke>
  3. This source is free software; you can redistribute it and/or modify it under
  4. the terms of the GNU General Public License as published by the Free
  5. Software Foundation; either version 2 of the License, or (at your option)
  6. any later version.
  7. This code is distributed in the hope that it will be useful, but WITHOUT ANY
  8. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. details.
  11. A copy of the GNU General Public License is available on the World Wide Web
  12. at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
  13. to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  14. MA 02110-1301, USA.
  15. }
  16. {$mode objfpc}
  17. program AVXTestGenerator;
  18. uses
  19. sysutils,
  20. AVXOpCodes in 'AVXOpCodes.pas',
  21. AsmTestGenerator in 'AsmTestGenerator.pas',
  22. Options in 'Options.pas';
  23. begin
  24. with TAVXTestGenerator.Create do
  25. try
  26. with TOptions.Create do
  27. try
  28. LoadParams;
  29. if Help then
  30. begin
  31. writeln('avx-testfile-generator 0.2');
  32. writeln('author: torsten grundke');
  33. writeln('');
  34. writeln('make avx assembler-testfiles');
  35. writeln('');
  36. writeln('-h help');
  37. writeln('-f [fpc,fpcmref,fpccd8,nasm,fasm,gas,fpcinc] outputformat');
  38. writeln('-l list opcode-memrefsize-states');
  39. writeln('-m create only these testfile(s) (e.g. -mvgather,vpgather)');
  40. writeln('-o destination path');
  41. writeln('-p [x8664] codegenerator for x86_64 platform');
  42. writeln('-z avx512');
  43. writeln('');
  44. end
  45. else
  46. begin
  47. //TAsmTestGenerator.CalcTestInstFile;
  48. //exit;
  49. case OutputFormat of
  50. 'f': MakeTestFiles(tfFPC, x64, AVX512, false, Path, Filemask);
  51. 'F': MakeTestFiles(tfFasm, x64, AVX512, false, Path, Filemask);
  52. 'n': MakeTestFiles(tfNasm, x64, AVX512, false, Path, Filemask);
  53. 'g': MakeTestFiles(tfGas, x64, AVX512, false, Path, Filemask);
  54. 'I': MakeTestFiles(tfFPCInc, x64, AVX512, false, Path, Filemask);
  55. 'm': MakeTestFiles(tfFPCMRef, x64, AVX512, false, Path, Filemask);
  56. 'd': MakeTestFiles(tfFPCCDisp8, x64, true, false, Path, Filemask);
  57. 'l': ListMemRefState;
  58. end;
  59. end;
  60. finally
  61. Free;
  62. end;
  63. finally
  64. Free;
  65. end;
  66. end.