Procházet zdrojové kódy

avxtestgenerator add attsuffix in 'opcode-memrefsize-state - list' (command-line option '-l')

git-svn-id: branches/tg74/avx512-0037785@48147 -
tg74 před 4 roky
rodič
revize
ee07cc4db5
1 změnil soubory, kde provedl 10 přidání a 1 odebrání
  1. 10 1
      tests/utils/avx/asmtestgenerator.pas

+ 10 - 1
tests/utils/avx/asmtestgenerator.pas

@@ -108,6 +108,7 @@ uses SysUtils, Dialogs, typinfo;
 
 type
   TAsmOp={$i ../../../compiler/x86_64/x8664op.inc}
+  TAttSuffix = (AttSufNONE,AttSufINT,AttSufFPU,AttSufFPUint,AttSufINTdual,AttSufMM,AttSufMMX,AttSufMMS);
 
   TMemRefSizeInfo = (msiUnknown, msiUnsupported, msiNoSize, msiNoMemRef,
                      msiMultiple, msiMultipleMinSize8, msiMultipleMinSize16, msiMultipleMinSize32,
@@ -148,6 +149,7 @@ type
 
 const
   instabentries = {$i ../../../compiler/x86_64/x8664nop.inc}
+  gas_needsuffix:array[tasmop] of TAttSuffix={$i ../../../compiler/x86_64/x8664ats.inc}
 
   MemRefMultiples: set of TMemRefSizeInfo = [msiMultiple, msiMultipleMinSize8,
                                              msiMultipleMinSize16, msiMultipleMinSize32,
@@ -4072,6 +4074,7 @@ end;
 class procedure TAsmTestGenerator.ListMemRefState;
 var
   i: integer;
+  sGasSufffix: string;
   mrsize: TMemRefSizeInfo;
   opcode: tasmop;
   sl: TStringList;
@@ -4090,7 +4093,13 @@ begin
         for opcode:=low(tasmop) to high(tasmop) do
         begin
           if InsTabMemRefSizeInfoCache^[opcode].MemRefSize = mrsize then
-           sl.add(format('%-25s:   %s', [GetEnumName(Typeinfo(TMemRefSizeInfo), ord(mrsize)), std_op2str[opcode]]));
+          begin
+            sGasSufffix:='';
+            if gas_needsuffix[opcode] <> AttSufNone then
+             sGasSufffix:=GetEnumName(Typeinfo(TAttSuffix), ord(gas_needsuffix[opcode]));
+
+            sl.add(format('%-25s:   %s: %s', [GetEnumName(Typeinfo(TMemRefSizeInfo), ord(mrsize)), std_op2str[opcode], sGasSufffix]));
+          end;
         end;
 
         sl.Sort;