avxtestgenerator.pp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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.1');
  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,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. 'I': MakeTestFiles(tfFPCInc, x64, AVX512, false, Path, Filemask);
  54. 'm': MakeTestFiles(tfFPCMRef, x64, AVX512, false, Path, Filemask);
  55. 'd': MakeTestFiles(tfFPCCDisp8, x64, true, false, Path, Filemask);
  56. 'l': ListMemRefState;
  57. end;
  58. end;
  59. finally
  60. Free;
  61. end;
  62. finally
  63. Free;
  64. end;
  65. end.