]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86/APX: extend TEST-by-imm7 optimization to CTESTcc
authorJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:24:12 +0000 (08:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:24:12 +0000 (08:24 +0200)
The same properties apply there.

gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-optimize-3.d
gas/testsuite/gas/i386/x86-64-optimize-3.s
gas/testsuite/gas/i386/x86-64-optimize-3b.d
opcodes/i386-opc.tbl
opcodes/i386-tbl.h

index 7ad0267929fd233f02b7cf23957d885e13931d3e..4de5c0127a3fa6f51a9e99c61b7a771a21b6808e 100644 (file)
@@ -4770,7 +4770,9 @@ optimize_encoding (void)
     }
 
   if (optimize_for_space
-      && i.tm.mnem_off == MN_test
+      && (i.tm.mnem_off == MN_test
+          || (i.tm.base_opcode == 0xf6
+              && i.tm.opcode_space == SPACE_EVEXMAP4))
       && i.reg_operands == 1
       && i.imm_operands == 1
       && !i.types[1].bitfield.byte
@@ -4779,9 +4781,13 @@ optimize_encoding (void)
       && fits_in_imm7 (i.op[0].imms->X_add_number))
     {
       /* Optimize: -Os:
-          test $imm7, %r64/%r32/%r16  -> test $imm7, %r8
+          test      $imm7, %r64/%r32/%r16  -> test      $imm7, %r8
+          ctest<cc> $imm7, %r64/%r32/%r16  -> ctest<cc> $imm7, %r8
        */
       unsigned int base_regnum = i.op[1].regs->reg_num;
+
+      gas_assert (!i.tm.opcode_modifier.modrm || i.tm.extension_opcode == 0);
+
       if (flag_code == CODE_64BIT || base_regnum < 4)
        {
          i.types[1].bitfield.byte = 1;
index 23b9305d25cf4f9b37c6171e5e115a8b52a6a469..51513c828e420641996d99b01cc8aa9b57c106f2 100644 (file)
@@ -28,6 +28,50 @@ Disassembly of section .text:
  +[a-f0-9]+:   41 f6 c4 7f             test   \$0x7f,%r12b
  +[a-f0-9]+:   41 f6 c4 7f             test   \$0x7f,%r12b
  +[a-f0-9]+:   41 f6 c4 7f             test   \$0x7f,%r12b
+ +[a-f0-9]+:   d5 10 f6 c6 7f          test   \$0x7f,%r22b
+ +[a-f0-9]+:   d5 10 f6 c6 7f          test   \$0x7f,%r22b
+ +[a-f0-9]+:   d5 10 f6 c6 7f          test   \$0x7f,%r22b
+ +[a-f0-9]+:   d5 10 f6 c6 7f          test   \$0x7f,%r22b
+ +[a-f0-9]+:   62 f4 04 0a f6 c3 7f    ctestt( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 0a f6 c3 7f    ctestt( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 0a f6 c3 7f    ctestt( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 0a f6 c3 7f    ctestt( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 0a f6 c7 7f    ctestt( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 0a f6 c7 7f    ctestt( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 0a f6 c7 7f    ctestt( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 0a f6 c7 7f    ctestt( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 d4 04 0a f6 c1 7f    ctestt( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 0a f6 c1 7f    ctestt( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 0a f6 c1 7f    ctestt( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 0a f6 c1 7f    ctestt( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 0a f6 c4 7f    ctestt( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 0a f6 c4 7f    ctestt( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 0a f6 c4 7f    ctestt( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 0a f6 c4 7f    ctestt( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 fc 04 0a f6 c6 7f    ctestt( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 0a f6 c6 7f    ctestt( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 0a f6 c6 7f    ctestt( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 0a f6 c6 7f    ctestt( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 f4 04 02 f6 c3 7f    ctestb( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 02 f6 c3 7f    ctestb( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 02 f6 c3 7f    ctestb( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 02 f6 c3 7f    ctestb( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 04 02 f6 c7 7f    ctestb( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 02 f6 c7 7f    ctestb( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 02 f6 c7 7f    ctestb( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 f4 04 02 f6 c7 7f    ctestb( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 d4 04 02 f6 c1 7f    ctestb( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 02 f6 c1 7f    ctestb( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 02 f6 c1 7f    ctestb( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 02 f6 c1 7f    ctestb( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 04 02 f6 c4 7f    ctestb( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 02 f6 c4 7f    ctestb( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 02 f6 c4 7f    ctestb( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 d4 04 02 f6 c4 7f    ctestb( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 fc 04 02 f6 c6 7f    ctestb( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 02 f6 c6 7f    ctestb( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 02 f6 c6 7f    ctestb( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 fc 04 02 f6 c6 7f    ctestb( \{dfv=\})? \$0x7f,%r22b
  +[a-f0-9]+:   20 c9                   and    %cl,%cl
  +[a-f0-9]+:   66 21 d2                and    %dx,%dx
  +[a-f0-9]+:   21 db                   and    %ebx,%ebx
index 843c3e491a4e754d05e7d6a85da97ea872f4f91e..b2cf16d05ffa628ca197b493f97d9c2bcb97a435 100644 (file)
@@ -6,22 +6,28 @@ _start:
        testl   $0x7f, %eax
        testw   $0x7f, %ax
        testb   $0x7f, %al
-       test    $0x7f, %rbx
-       test    $0x7f, %ebx
-       test    $0x7f, %bx
-       test    $0x7f, %bl
-       test    $0x7f, %rdi
-       test    $0x7f, %edi
-       test    $0x7f, %di
-       test    $0x7f, %dil
-       test    $0x7f, %r9
-       test    $0x7f, %r9d
-       test    $0x7f, %r9w
-       test    $0x7f, %r9b
-       test    $0x7f, %r12
-       test    $0x7f, %r12d
-       test    $0x7f, %r12w
-       test    $0x7f, %r12b
+       .irp tst, test, "{evex} test", ctestc
+       \tst    $0x7f, %rbx
+       \tst    $0x7f, %ebx
+       \tst    $0x7f, %bx
+       \tst    $0x7f, %bl
+       \tst    $0x7f, %rdi
+       \tst    $0x7f, %edi
+       \tst    $0x7f, %di
+       \tst    $0x7f, %dil
+       \tst    $0x7f, %r9
+       \tst    $0x7f, %r9d
+       \tst    $0x7f, %r9w
+       \tst    $0x7f, %r9b
+       \tst    $0x7f, %r12
+       \tst    $0x7f, %r12d
+       \tst    $0x7f, %r12w
+       \tst    $0x7f, %r12b
+       \tst    $0x7f, %r22
+       \tst    $0x7f, %r22d
+       \tst    $0x7f, %r22w
+       \tst    $0x7f, %r22b
+       .endr
 
        and     %cl, %cl
        and     %dx, %dx
index 476708a485aa125231393993f4e160e6b264011c..abfc8f917818cb8ff252afa40e15af3b80dab858 100644 (file)
@@ -29,6 +29,50 @@ Disassembly of section .text:
  +[a-f0-9]+:   41 f7 c4 7f 00 00 00    test   \$0x7f,%r12d
  +[a-f0-9]+:   66 41 f7 c4 7f 00       test   \$0x7f,%r12w
  +[a-f0-9]+:   41 f6 c4 7f             test   \$0x7f,%r12b
+ +[a-f0-9]+:   d5 18 f7 c6 7f 00 00 00         test   \$0x7f,%r22
+ +[a-f0-9]+:   d5 10 f7 c6 7f 00 00 00         test   \$0x7f,%r22d
+ +[a-f0-9]+:   66 d5 10 f7 c6 7f 00    test   \$0x7f,%r22w
+ +[a-f0-9]+:   d5 10 f6 c6 7f          test   \$0x7f,%r22b
+ +[a-f0-9]+:   62 f4 84 0a f7 c3 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%rbx
+ +[a-f0-9]+:   62 f4 04 0a f7 c3 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%ebx
+ +[a-f0-9]+:   62 f4 05 0a f7 c3 7f 00         ctestt( \{dfv=\})? \$0x7f,%bx
+ +[a-f0-9]+:   62 f4 04 0a f6 c3 7f    ctestt( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 84 0a f7 c7 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%rdi
+ +[a-f0-9]+:   62 f4 04 0a f7 c7 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%edi
+ +[a-f0-9]+:   62 f4 05 0a f7 c7 7f 00         ctestt( \{dfv=\})? \$0x7f,%di
+ +[a-f0-9]+:   62 f4 04 0a f6 c7 7f    ctestt( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 d4 84 0a f7 c1 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r9
+ +[a-f0-9]+:   62 d4 04 0a f7 c1 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r9d
+ +[a-f0-9]+:   62 d4 05 0a f7 c1 7f 00         ctestt( \{dfv=\})? \$0x7f,%r9w
+ +[a-f0-9]+:   62 d4 04 0a f6 c1 7f    ctestt( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 84 0a f7 c4 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r12
+ +[a-f0-9]+:   62 d4 04 0a f7 c4 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r12d
+ +[a-f0-9]+:   62 d4 05 0a f7 c4 7f 00         ctestt( \{dfv=\})? \$0x7f,%r12w
+ +[a-f0-9]+:   62 d4 04 0a f6 c4 7f    ctestt( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 fc 84 0a f7 c6 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r22
+ +[a-f0-9]+:   62 fc 04 0a f7 c6 7f 00 00 00   ctestt( \{dfv=\})? \$0x7f,%r22d
+ +[a-f0-9]+:   62 fc 05 0a f7 c6 7f 00         ctestt( \{dfv=\})? \$0x7f,%r22w
+ +[a-f0-9]+:   62 fc 04 0a f6 c6 7f    ctestt( \{dfv=\})? \$0x7f,%r22b
+ +[a-f0-9]+:   62 f4 84 02 f7 c3 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%rbx
+ +[a-f0-9]+:   62 f4 04 02 f7 c3 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%ebx
+ +[a-f0-9]+:   62 f4 05 02 f7 c3 7f 00         ctestb( \{dfv=\})? \$0x7f,%bx
+ +[a-f0-9]+:   62 f4 04 02 f6 c3 7f    ctestb( \{dfv=\})? \$0x7f,%bl
+ +[a-f0-9]+:   62 f4 84 02 f7 c7 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%rdi
+ +[a-f0-9]+:   62 f4 04 02 f7 c7 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%edi
+ +[a-f0-9]+:   62 f4 05 02 f7 c7 7f 00         ctestb( \{dfv=\})? \$0x7f,%di
+ +[a-f0-9]+:   62 f4 04 02 f6 c7 7f    ctestb( \{dfv=\})? \$0x7f,%dil
+ +[a-f0-9]+:   62 d4 84 02 f7 c1 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r9
+ +[a-f0-9]+:   62 d4 04 02 f7 c1 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r9d
+ +[a-f0-9]+:   62 d4 05 02 f7 c1 7f 00         ctestb( \{dfv=\})? \$0x7f,%r9w
+ +[a-f0-9]+:   62 d4 04 02 f6 c1 7f    ctestb( \{dfv=\})? \$0x7f,%r9b
+ +[a-f0-9]+:   62 d4 84 02 f7 c4 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r12
+ +[a-f0-9]+:   62 d4 04 02 f7 c4 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r12d
+ +[a-f0-9]+:   62 d4 05 02 f7 c4 7f 00         ctestb( \{dfv=\})? \$0x7f,%r12w
+ +[a-f0-9]+:   62 d4 04 02 f6 c4 7f    ctestb( \{dfv=\})? \$0x7f,%r12b
+ +[a-f0-9]+:   62 fc 84 02 f7 c6 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r22
+ +[a-f0-9]+:   62 fc 04 02 f7 c6 7f 00 00 00   ctestb( \{dfv=\})? \$0x7f,%r22d
+ +[a-f0-9]+:   62 fc 05 02 f7 c6 7f 00         ctestb( \{dfv=\})? \$0x7f,%r22w
+ +[a-f0-9]+:   62 fc 04 02 f6 c6 7f    ctestb( \{dfv=\})? \$0x7f,%r22b
  +[a-f0-9]+:   84 c9                   test   %cl,%cl
  +[a-f0-9]+:   66 85 d2                test   %dx,%dx
  +[a-f0-9]+:   21 db                   and    %ebx,%ebx
index 42c52e444f913e7334e7dc55b97e1a00a2f97154..fa7e9b48e59c056134b3aa6fb574d143690b7029 100644 (file)
@@ -357,10 +357,10 @@ test, 0x84, 0, D|W|C|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64, R
 test, 0xa8, 0, W|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword }
 test, 0xf6/0, 0, W|Modrm|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
 test, 0x840a, 0, D|W|C|CheckOperandSize|Modrm|EVexMap4|Scc|No_sSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
-test, 0xf60a/0, 0, W|Modrm|EVexMap4|Scc|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
+test, 0xf60a/0, 0, W|Modrm|EVexMap4|Scc|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
 
 ctest<scc>, 0x840<scc:opc>, APX_F, D|W|C|CheckOperandSize|Modrm|EVexMap4|Scc|No_sSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
-ctest<scc>, 0xf60<scc:opc>/0, APX_F, W|Modrm|EVexMap4|Scc|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
+ctest<scc>, 0xf60<scc:opc>/0, APX_F, W|Modrm|EVexMap4|Scc|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex }
 
 <scc>
 
index 885fbc42f3df017906f87773d4c041e8d03f6231..e136d598da6429e506ed6bdf79f84e01b648c654 100644 (file)
@@ -2502,7 +2502,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_test, 0xf60a, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2522,7 +2522,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctesto, 0xf600, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2542,7 +2542,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestno, 0xf601, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2562,7 +2562,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestb, 0xf602, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2582,7 +2582,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestc, 0xf602, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2602,7 +2602,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnae, 0xf602, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2622,7 +2622,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnb, 0xf603, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2642,7 +2642,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnc, 0xf603, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2662,7 +2662,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestae, 0xf603, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2682,7 +2682,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_cteste, 0xf604, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2702,7 +2702,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestz, 0xf604, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2722,7 +2722,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestne, 0xf605, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2742,7 +2742,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnz, 0xf605, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2762,7 +2762,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestbe, 0xf606, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2782,7 +2782,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestna, 0xf606, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2802,7 +2802,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnbe, 0xf607, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2822,7 +2822,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctesta, 0xf607, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2842,7 +2842,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctests, 0xf608, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2862,7 +2862,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestns, 0xf609, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2882,7 +2882,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestt, 0xf60a, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2902,7 +2902,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestf, 0xf60b, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2922,7 +2922,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestl, 0xf60c, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2942,7 +2942,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnge, 0xf60c, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2962,7 +2962,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnl, 0xf60d, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -2982,7 +2982,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestge, 0xf60d, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -3002,7 +3002,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestle, 0xf60e, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -3022,7 +3022,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestng, 0xf60e, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -3042,7 +3042,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestnle, 0xf60f, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -3062,7 +3062,7 @@ static const insn_template i386_optab[] =
          0, 0, 0, 0, 1, 0 } } } },
   { MN_ctestg, 0xf60f, 2, SPACE_EVEXMAP4, 0,
     { 0, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
       0, 0 },
     { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },