Browse Source

working on new testmethods (memref-operands)

git-svn-id: branches/tg74/avx512-0037785@47608 -
tg74 4 years ago
parent
commit
f4251bc11a
2 changed files with 39 additions and 29 deletions
  1. 34 24
      tests/utils/avx/avxopcodes.pas
  2. 5 5
      tests/utils/avx/avxtestgenerator.lpi

+ 34 - 24
tests/utils/avx/avxopcodes.pas

@@ -3266,6 +3266,7 @@ var
   sLocalVarDataTyp: string;
   sl: TStringList;
   slAsm: TStringList;
+  slLocalHeader: TStringList;
   LastOpCode: String;
   NewOpCode: String;
 
@@ -3308,31 +3309,40 @@ begin
              (aX64 and (sl[2] = '1')) then    // x86_64
           begin
 	    sDestFile := format('%s_%d%s', [NewOpcode, i, trim(copy(sl[4],1,1) + copy(sl[5],1,1) + copy(sl[6],1,1) + copy(sl[7],1,1))]);
-            
-	    if (sl[4]  = '') and
-               (sl[5]  = '') and
-               (sl[6]  = '') and
-               (sl[7]  = '') then
-            begin                                        // Opcode with no Params, e.g. VZEROALL
-              slAsm.Add('    ' + sl[0]);
-            end
-            else 
-	    begin
-              if aMREF then
-	      begin	      
- 	        TAsmTestGenerator.CalcTestDataMREF(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm, sLocalVarDataTyp);
-		sDestFile := 'MREF_' + sDestFile;
-                
-		if trim(sLocalVarDataTyp) = '' then
-		 sLocalVarDataTyp := 'byte';
- 
-                aHeaderList.Text :=  StringReplace(aHeaderList.Text, '$$$LOCALVARDATATYP$$$', sLocalVarDataTyp, [rfReplaceAll]);
-	      end
-   	      else TAsmTestGenerator.CalcTestData(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm);
-	    end;	    
 
-            SaveFile(slAsm, sDestFile, aDestPath, aFileExt, aHeaderList, aFooterList);
-            writeln(format('%s%s%s', [aDestPath, sDestFile, aFileExt]));
+            slLocalHeader := TStringList.Create;
+            try
+              slLocalHeader.Text := aHeaderList.text;
+
+	      if (sl[4]  = '') and
+                 (sl[5]  = '') and
+                 (sl[6]  = '') and
+                 (sl[7]  = '') then
+              begin                                        // Opcode with no Params, e.g. VZEROALL
+                slAsm.Add('    ' + sl[0]);
+              end
+              else
+	      begin
+                if aMREF then
+	        begin
+                  sLocalVarDataTyp := '';
+ 	          TAsmTestGenerator.CalcTestDataMREF(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm, sLocalVarDataTyp);
+		  sDestFile := 'MREF_' + sDestFile;
+
+		  if trim(sLocalVarDataTyp) = '' then
+		   sLocalVarDataTyp := 'byte';
+
+                  slLocalHeader.Text :=  StringReplace(aHeaderList.Text, '$$$LOCALVARDATATYP$$$', sLocalVarDataTyp, [rfReplaceAll]);
+	        end
+   	        else TAsmTestGenerator.CalcTestData(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm);
+	      end;
+
+              SaveFile(slAsm, sDestFile, aDestPath, aFileExt, slLocalHeader, aFooterList);
+              writeln(format('%s%s%s', [aDestPath, sDestFile, aFileExt]));
+
+            finally
+              FreeAndNil(slLocalHeader);
+            end;
 
             slAsm.Clear;
           end;

+ 5 - 5
tests/utils/avx/avxtestgenerator.lpi

@@ -1,13 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <CONFIG>
   <ProjectOptions>
-    <Version Value="11"/>
+    <Version Value="9"/>
     <PathDelim Value="\"/>
     <General>
       <Flags>
         <MainUnitHasCreateFormStatements Value="False"/>
         <MainUnitHasTitleStatement Value="False"/>
-        <MainUnitHasScaledStatement Value="False"/>
       </Flags>
       <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
@@ -20,11 +19,12 @@
     </BuildModes>
     <PublishOptions>
       <Version Value="2"/>
-      <UseFileFilters Value="True"/>
     </PublishOptions>
     <RunParams>
-      <FormatVersion Value="2"/>
-      <Modes Count="0"/>
+      <local>
+        <FormatVersion Value="1"/>
+        <CommandLineParams Value="-ffpcmref -px8664 -o\home\torsten\tmp\fpc\fpc"/>
+      </local>
     </RunParams>
     <Units Count="4">
       <Unit0>