avxtestgenerator.pp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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,nasm,fasm,fpcinc] outputformat');
  38. writeln('-p [x8664] codegenerator for x86_64 platform');
  39. writeln('-o destination path');
  40. writeln('');
  41. end
  42. else
  43. begin
  44. case OutputFormat of
  45. 'f': MakeTestFiles(tfFPC, x64, Path);
  46. 'F': MakeTestFiles(tfFasm, x64, Path);
  47. 'n': MakeTestFiles(tfNasm, x64, Path);
  48. 'I': MakeTestFiles(tfFPCInc, x64, Path);
  49. end;
  50. end;
  51. finally
  52. Free;
  53. end;
  54. finally
  55. Free;
  56. end;
  57. end.