x86: replace EXqScalarS by EXqVexScalarS
authorJan Beulich <jbeulich@suse.com>
Mon, 6 Jul 2020 11:35:38 +0000 (13:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 6 Jul 2020 11:35:38 +0000 (13:35 +0200)
There's only a single user, that that one can do fine with the
alternative, as the "Vex" aspect of the other operand kind is meaningful
only on 3-operand insns.

While doing this I noticed that I didn't need to do the same adjustment
in the EVEX tables, and voilĂ  - there was a bug, which gets fixed at the
same time (see the testsuite changes).

gas/ChangeLog
gas/testsuite/gas/i386/avx512f-opts-intel.d
gas/testsuite/gas/i386/avx512f-opts.d
gas/testsuite/gas/i386/avx512f-opts.s
gas/testsuite/gas/i386/x86-64-avx512f-opts-intel.d
gas/testsuite/gas/i386/x86-64-avx512f-opts.d
gas/testsuite/gas/i386/x86-64-avx512f-opts.s
opcodes/ChangeLog
opcodes/i386-dis-evex-w.h
opcodes/i386-dis.c

index 532211ec52f8c880657c0ecea32bc309b825c03b..db578b778dc282877ef8a5e542c090b1c7294804 100644 (file)
@@ -1,3 +1,12 @@
+2020-07-06  Jan Beulich  <jbeulich@suse.com>
+
+       * testsuite/gas/i386/avx512f-opts.s: Add EVEX movq tests.
+       * testsuite/gas/i386/x86-64-avx512f-opts.s: Add blank line.
+       * testsuite/gas/i386/avx512f-opts-intel.d,
+       testsuite/gas/i386/avx512f-opts.d
+       testsuite/gas/i386/x86-64-avx512f-opts-intel.d
+       testsuite/gas/i386/x86-64-avx512f-opts.d: Adjust expectations.
+
 2020-07-06  Yuri Chornoivan  <yurchor@ukr.net>
 
        PR 26204
index 98d0d461ee3cb2cd00906559382b5dd8c796ff17..1a38ef65dc75f689dfbcbaed7a0f9f1fec2e65b4 100644 (file)
@@ -65,6 +65,8 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 f1 7c 4f 10 f5       vmovups zmm6\{k7\},zmm5
 [      ]*[a-f0-9]+:    62 f1 7c cf 11 ee       vmovups.s zmm6\{k7\}\{z\},zmm5
 [      ]*[a-f0-9]+:    62 f1 7c cf 10 f5       vmovups zmm6\{k7\}\{z\},zmm5
+[      ]*[a-f0-9]+:    62 f1 fd 08 d6 ee       vmovq\.s xmm6,xmm5
+[      ]*[a-f0-9]+:    62 f1 fe 08 7e f5       vmovq  xmm6,xmm5
 [      ]*[a-f0-9]+:    62 f1 fd 48 29 ee       vmovapd.s zmm6,zmm5
 [      ]*[a-f0-9]+:    62 f1 fd 48 28 f5       vmovapd zmm6,zmm5
 [      ]*[a-f0-9]+:    62 f1 fd 4f 29 ee       vmovapd.s zmm6\{k7\},zmm5
index ba940657d217932ee87dd0a9a5d83a92233c31f1..19697e9b7fd4e44ca0328b0b713007cb27dc14ef 100644 (file)
@@ -64,6 +64,8 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 f1 7c 4f 10 f5       vmovups %zmm5,%zmm6\{%k7\}
 [      ]*[a-f0-9]+:    62 f1 7c cf 11 ee       vmovups.s %zmm5,%zmm6\{%k7\}\{z\}
 [      ]*[a-f0-9]+:    62 f1 7c cf 10 f5       vmovups %zmm5,%zmm6\{%k7\}\{z\}
+[      ]*[a-f0-9]+:    62 f1 fd 08 d6 ee       vmovq\.s %xmm5,%xmm6
+[      ]*[a-f0-9]+:    62 f1 fe 08 7e f5       vmovq  %xmm5,%xmm6
 [      ]*[a-f0-9]+:    62 f1 fd 48 29 ee       vmovapd.s %zmm5,%zmm6
 [      ]*[a-f0-9]+:    62 f1 fd 48 28 f5       vmovapd %zmm5,%zmm6
 [      ]*[a-f0-9]+:    62 f1 fd 4f 29 ee       vmovapd.s %zmm5,%zmm6\{%k7\}
index 88fee28808467034371379ba525679a2607ec5e1..91ccd2544af0526f8b3520441ea469579dc54367 100644 (file)
@@ -60,6 +60,9 @@ _start:
        vmovups %zmm5, %zmm6{%k7}        # AVX512F
        vmovups.s       %zmm5, %zmm6{%k7}{z}     # AVX512F
        vmovups %zmm5, %zmm6{%k7}{z}     # AVX512F
+       {evex} vmovq.s  %xmm5,%xmm6
+       {evex} vmovq    %xmm5,%xmm6
+
        .intel_syntax noprefix
        vmovapd.s       zmm6, zmm5       # AVX512F
        vmovapd zmm6, zmm5       # AVX512F
index ad3d1356435bba1829573f00b969e88489f167ea..92b148642875d35509f8feae02b72de0807c2d40 100644 (file)
@@ -55,7 +55,7 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 61 fd 08 7e f0       vmovq  rax,xmm30
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  r8,xmm30
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  r8,xmm30
-[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq  xmm30,xmm29
+[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq\.s xmm30,xmm29
 [      ]*[a-f0-9]+:    62 01 fe 08 7e f5       vmovq  xmm30,xmm29
 [      ]*[a-f0-9]+:    62 01 97 07 11 e6       vmovsd.s xmm30\{k7\},xmm29,xmm28
 [      ]*[a-f0-9]+:    62 01 97 07 10 f4       vmovsd xmm30\{k7\},xmm29,xmm28
@@ -123,7 +123,7 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 61 fd 08 7e f0       vmovq  rax,xmm30
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  r8,xmm30
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  r8,xmm30
-[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq  xmm30,xmm29
+[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq\.s xmm30,xmm29
 [      ]*[a-f0-9]+:    62 01 fe 08 7e f5       vmovq  xmm30,xmm29
 [      ]*[a-f0-9]+:    62 01 97 07 11 e6       vmovsd.s xmm30\{k7\},xmm29,xmm28
 [      ]*[a-f0-9]+:    62 01 97 07 10 f4       vmovsd xmm30\{k7\},xmm29,xmm28
index 3cce248d00c2b71ead6cfbe97467e01b9078371b..eeb296a08b09106581fc5e48f9dd42dfe006aa01 100644 (file)
@@ -54,7 +54,7 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 61 fd 08 7e f0       vmovq  %xmm30,%rax
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  %xmm30,%r8
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  %xmm30,%r8
-[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq  %xmm29,%xmm30
+[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq\.s %xmm29,%xmm30
 [      ]*[a-f0-9]+:    62 01 fe 08 7e f5       vmovq  %xmm29,%xmm30
 [      ]*[a-f0-9]+:    62 01 97 07 11 e6       vmovsd.s %xmm28,%xmm29,%xmm30\{%k7\}
 [      ]*[a-f0-9]+:    62 01 97 07 10 f4       vmovsd %xmm28,%xmm29,%xmm30\{%k7\}
@@ -122,7 +122,7 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    62 61 fd 08 7e f0       vmovq  %xmm30,%rax
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  %xmm30,%r8
 [      ]*[a-f0-9]+:    62 41 fd 08 7e f0       vmovq  %xmm30,%r8
-[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq  %xmm29,%xmm30
+[      ]*[a-f0-9]+:    62 01 fd 08 d6 ee       vmovq\.s %xmm29,%xmm30
 [      ]*[a-f0-9]+:    62 01 fe 08 7e f5       vmovq  %xmm29,%xmm30
 [      ]*[a-f0-9]+:    62 01 97 07 11 e6       vmovsd.s %xmm28,%xmm29,%xmm30\{%k7\}
 [      ]*[a-f0-9]+:    62 01 97 07 10 f4       vmovsd %xmm28,%xmm29,%xmm30\{%k7\}
index 997c84690cd65ffe5a3a818f876b96909323fd76..27898a198af57cd9d78a42ee59a473e12a650916 100644 (file)
@@ -72,6 +72,7 @@ _start:
        vmovups %zmm29, %zmm30{%k7}      # AVX512F
        vmovups.s       %zmm29, %zmm30{%k7}{z}   # AVX512F
        vmovups %zmm29, %zmm30{%k7}{z}   # AVX512F
+
        .intel_syntax noprefix
        vmovapd.s       zmm30, zmm29     # AVX512F
        vmovapd zmm30, zmm29     # AVX512F
index 3578b6b745b4e7605fd626bf50ab6504e855cfdc..205db9b06d9ceffec31599fa38c6b582b8651283 100644 (file)
@@ -1,3 +1,9 @@
+2020-07-06  Jan Beulich  <jbeulich@suse.com>
+
+       * i386-dis.c (EXqScalarS): Delete.
+       (vex_len_table): Replace EXqScalarS by EXqVexScalarS.
+       * i386-dis-evex-w.h (vmovq): Use EXqVexScalarS.
+
 2020-07-06  Jan Beulich  <jbeulich@suse.com>
 
        * i386-dis.c (safe-ctype.h): Include.
index 3029169050294a75f294e047e20c2d6bddee8e73..45ecb87ab4464dcef8f782031ca94f536592df6c 100644 (file)
   /* EVEX_W_0FD6_P_2 */
   {
     { Bad_Opcode },
-    { "vmovq", { EXxmm_mq, XMScalar }, 0 },
+    { "vmovq", { EXqVexScalarS, XMScalar }, 0 },
   },
   /* EVEX_W_0FE6_P_1 */
   {
index 9147c37220c66cadce3d252f5e0314e3df4fa8d2..8ef1aa7e4959063569725461ac79aa56b5597286 100644 (file)
@@ -386,7 +386,6 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
 #define EXd { OP_EX, d_mode }
 #define EXdS { OP_EX, d_swap_mode }
 #define EXq { OP_EX, q_mode }
-#define EXqScalarS { OP_EX, q_scalar_swap_mode }
 #define EXqS { OP_EX, q_swap_mode }
 #define EXx { OP_EX, x_mode }
 #define EXxS { OP_EX, x_swap_mode }
@@ -9498,7 +9497,7 @@ static const struct dis386 vex_len_table[][2] = {
 
   /* VEX_LEN_0FD6_P_2 */
   {
-    { "vmovq",         { EXqScalarS, XMScalar }, 0 },
+    { "vmovq",         { EXqVexScalarS, XMScalar }, 0 },
   },
 
   /* VEX_LEN_0FF7_P_2 */
This page took 0.029049 seconds and 4 git commands to generate.