Browse Source

avxtestgenerator: working on new testmethods avx512-memref-operands - 'compressed disp8*N'

git-svn-id: branches/tg74/avx512-0037785@48500 -
tg74 4 years ago
parent
commit
cf1fa4cf7f
2 changed files with 20 additions and 9 deletions
  1. 15 9
      tests/utils/avx/asmtestgenerator.pas
  2. 5 0
      tests/utils/avx/avxopcodes.pas

+ 15 - 9
tests/utils/avx/asmtestgenerator.pas

@@ -3581,6 +3581,7 @@ var
   iAsmCounter: integer;
 
   sSuffix: string;
+  sReg: string;
   sl_Operand: String;
   sl_Inst   : String;
   sRegCombi: String;
@@ -4900,15 +4901,20 @@ begin
                                    end;
                             omXXM: begin
                                      result.Add(format('%20s%6s,%6s, %s + $00', [aInst, 'XMM1', 'XMM1', OItem3.Values[il_Op3] ]));
-                                     result.Add(format('%20s%6s,%6s, %s',       ['vpcmpeqq', 'K2', OItem1.Values[il_Op1], 'XMM1']));
-                                     result.Add(format('%20s%6s',               ['    push', 'EDX']));
-                                     result.Add(format('%20s%6s,%s',            ['     mov', 'EDX', str(iAsmCounter)]));
-                                     result.Add(format('%20s%6s',               ['    push', 'EDX']));
-                                     result.Add(format('%20s%6s,%6s',           ['   kmovd', 'EDX', 'K2']));
-                                     result.Add(format('%20s%6s,%6s',           ['     cmp', 'EDX', '$03']));
-                                     result.Add(format('%20s%6s',               ['     pop', 'EDX']));
-                                     result.Add(format('%20s%6s',               ['     jne', '@@CHECKRESULT']));
-                                     result.Add(format('%20s%6s',               ['     pop', 'EDX']));
+                                     result.Add(format('%20s%6s,%6s, %s',       ['vpcmpeqw', 'K2', OItem1.Values[il_Op1], 'XMM1']));
+
+                                     case Fx64 of
+                                       true: sReg := 'RAX';
+                                        else sReg := 'EAX';
+                                     end;
+
+                                     result.Add(format('%20s%6s',               ['    push', sReg]));
+                                     result.Add(format('%20s%6s,%s',            ['     mov', sReg, str(iAsmCounter)]));
+                                     result.Add(format('%20s%6s,%s',            ['   kmovd', 'K7', 'EAX']));
+                                     result.Add(format('%20s%6s',               ['     pop', sReg]));
+
+                                     result.Add(format('%20s%6s,%6s',           ['kortestb', 'K1', 'K2']));
+                                     result.Add(format('%20s%6s',               ['     jnc', '@@CHECKRESULT']));
                                      result.Add('');
                                    end;
                           omXXB32,

+ 5 - 0
tests/utils/avx/avxopcodes.pas

@@ -3722,9 +3722,14 @@ begin
                     slHeader.Add('      push      eax');
                   end;
 
+
                   for i := 1 to 10 do
                    slHeader.Add('NOP');
 
+                  slFooter.Add('        xor   eax, eax');
+                  slFooter.Add('  @@CHECKRESULT:   ');
+
+
                   if aX64 then slFooter.Add('        pop rax')
                    else slFooter.Add('        pop eax');