Browse Source

merge avxtestgenerator backward from trunk

git-svn-id: branches/tg74/fixes_3_2@48107 -
tg74 4 years ago
parent
commit
4c125ac23f

File diff suppressed because it is too large
+ 1058 - 6
tests/utils/avx/asmtestgenerator.pas


File diff suppressed because it is too large
+ 1982 - 758
tests/utils/avx/avxopcodes.pas


+ 14 - 5
tests/utils/avx/avxtestgenerator.pp

@@ -30,6 +30,8 @@ uses
 begin
   with TAVXTestGenerator.Create do
   try
+    
+
     with TOptions.Create do
     try
       LoadParams;
@@ -42,17 +44,24 @@ begin
         writeln('make avx assembler-testfiles');
         writeln('');
         writeln('-h  help');
-        writeln('-f  [fpc,nasm,fasm] outputformat');
-        writeln('-p  [x8664] codegenerator for x86_64 platform');
+        writeln('-f  [fpc,fpcmref,nasm,fasm,fpcinc] outputformat');
+        writeln('-l  list opcode-memrefsize-states');
+        writeln('-m  create only these testfile(s) (e.g. -mvgather,vpgather)');
         writeln('-o  destination path');
+        writeln('-p  [x8664] codegenerator for x86_64 platform');
+
+
         writeln('');
       end
       else
       begin
         case OutputFormat of
-          'f': MakeTestFiles(tfFPC, x64, Path);
-          'F': MakeTestFiles(tfFasm, x64, Path);
-          'n': MakeTestFiles(tfNasm, x64, Path);
+          'f': MakeTestFiles(tfFPC, x64, Path, Filemask);
+          'F': MakeTestFiles(tfFasm, x64, Path, Filemask);
+          'n': MakeTestFiles(tfNasm, x64, Path, Filemask);
+          'I': MakeTestFiles(tfFPCInc, x64, Path, Filemask);
+          'm': MakeTestFiles(tfFPCMRef, x64, Path, Filemask);
+          'l': ListMemRefState;
         end;
       end;
     finally

+ 12 - 0
tests/utils/avx/options.pas

@@ -32,6 +32,8 @@ type
     FX64: boolean;
     FOutputFormat: Char;
     FPath: string;
+    FMemRef: boolean;
+    FFilemask: string;
   public
     constructor Create;
 
@@ -41,6 +43,8 @@ type
     property OutputFormat: Char read FOutputFormat write FOutputFormat;
     property X64: boolean read FX64 write FX64;
     property Path: string read FPath write FPath;
+    property MemRef: boolean read FMemref write FMemRef;
+    property Filemask: string read FFilemask write FFilemask;
   end;
 
 implementation
@@ -55,6 +59,8 @@ begin
   FX64           := false;
   FOutputFormat  := '?';
   FPath          := '';
+  FMemRef        := false;
+  FFilemask      := '';
 end;
 
 procedure TOptions.LoadParams;
@@ -84,12 +90,18 @@ begin
          'f': if sValue = 'fpc' then FOutputFormat := 'f'
                else if sValue = 'nasm' then FOutputFormat := 'n'
                else if sValue = 'fasm' then FOutputFormat := 'F'
+               else if sValue = 'fpcinc' then FOutputFormat := 'I'
+               else if sValue = 'fpcmref' then FOutputFormat := 'm'
+
                else IsInvalidParam := true;
          'p': if sValue = 'x8664' then
               begin
                 Fx64 := true;
               end
               else IsInvalidParam := true;
+         'l': FOutputFormat := 'l';
+
+	 'm': FFilemask := sValue;
          'o': if sValue <> '' then
               begin
                 FPath :=  IncludeTrailingBackslash(sValue);

Some files were not shown because too many files changed in this diff