aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-10-20 10:01:12 +0200
committerJan Beulich <jbeulich@suse.com>2022-10-20 10:01:12 +0200
commit837e225ba1992f9745e5bbbd5e8443243a7f475f (patch)
treea540ffd72839917cfbc5b8580c1dfc85904bcd2b /gas
parent15ede33bfa86fd2dfd2d088e01ac2d20cdba46c9 (diff)
downloadgdb-837e225ba1992f9745e5bbbd5e8443243a7f475f.zip
gdb-837e225ba1992f9745e5bbbd5e8443243a7f475f.tar.gz
gdb-837e225ba1992f9745e5bbbd5e8443243a7f475f.tar.bz2
x86: re-work AVX-VNNI support
By putting the templates after their AVX512 counterparts, the AVX512 flavors will be picked by default. That way the need to always use {vex} ceases to exist once respective CPU features (AVX512-VNNI or AVX512VL as a whole) have been disabled. This way the need for the PseudoVexPrefix attribute also disappears.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c6
-rw-r--r--gas/testsuite/gas/i386/avx-vnni-inval.l3
-rw-r--r--gas/testsuite/gas/i386/avx-vnni-inval.s3
-rw-r--r--gas/testsuite/gas/i386/avx-vnni.d7
-rw-r--r--gas/testsuite/gas/i386/avx-vnni.s19
-rw-r--r--gas/testsuite/gas/i386/x86-64-avx-vnni-inval.l5
-rw-r--r--gas/testsuite/gas/i386/x86-64-avx-vnni-inval.s5
7 files changed, 36 insertions, 12 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 01f84cb..526802e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6456,12 +6456,6 @@ match_template (char mnem_suffix)
if (cpu_flags_match (t) != CPU_FLAGS_PERFECT_MATCH)
continue;
- /* Check Pseudo Prefix. */
- if (t->opcode_modifier.pseudovexprefix
- && !(i.vec_encoding == vex_encoding_vex
- || i.vec_encoding == vex_encoding_vex3))
- continue;
-
/* Check AT&T mnemonic. */
specific_error = progress (unsupported_with_intel_mnemonic);
if (intel_mnemonic && t->opcode_modifier.attmnemonic)
diff --git a/gas/testsuite/gas/i386/avx-vnni-inval.l b/gas/testsuite/gas/i386/avx-vnni-inval.l
index c55f100..58535cf 100644
--- a/gas/testsuite/gas/i386/avx-vnni-inval.l
+++ b/gas/testsuite/gas/i386/avx-vnni-inval.l
@@ -1,2 +1,3 @@
.* Assembler messages:
-.*:6: Error: unsupported instruction `vpdpbusd'
+.*:6: Error: unsupported .* `vpdpbusd'
+.*:7: Error: operand .* `vpdpbusd'
diff --git a/gas/testsuite/gas/i386/avx-vnni-inval.s b/gas/testsuite/gas/i386/avx-vnni-inval.s
index c06babf..28366f1 100644
--- a/gas/testsuite/gas/i386/avx-vnni-inval.s
+++ b/gas/testsuite/gas/i386/avx-vnni-inval.s
@@ -3,4 +3,5 @@
.text
.arch .noavx512_vnni
_start:
- vpdpbusd %xmm2,%xmm4,%xmm2
+ vpdpbusd %xmm2, %xmm4, %xmm2{%k6}
+ vpdpbusd %zmm2, %zmm4, %zmm2
diff --git a/gas/testsuite/gas/i386/avx-vnni.d b/gas/testsuite/gas/i386/avx-vnni.d
index 7d20c80..47e3118 100644
--- a/gas/testsuite/gas/i386/avx-vnni.d
+++ b/gas/testsuite/gas/i386/avx-vnni.d
@@ -31,5 +31,12 @@ Disassembly of section .text:
+[a-f0-9]+: c4 e2 59 53 d2 \{vex\} vpdpwssds %xmm2,%xmm4,%xmm2
+[a-f0-9]+: c4 e2 59 53 11 \{vex\} vpdpwssds \(%ecx\),%xmm4,%xmm2
+[a-f0-9]+: c4 e2 59 53 11 \{vex\} vpdpwssds \(%ecx\),%xmm4,%xmm2
+ +[a-f0-9]+: 62 f2 7d 48 50 c0 vpdpbusd %zmm0,%zmm0,%zmm0
+ +[a-f0-9]+: c4 e2 7d 50 c0 \{vex\} vpdpbusd %ymm0,%ymm0,%ymm0
+ +[a-f0-9]+: c4 e2 79 50 c0 \{vex\} vpdpbusd %xmm0,%xmm0,%xmm0
+ +[a-f0-9]+: c4 e2 7d 50 c0 \{vex\} vpdpbusd %ymm0,%ymm0,%ymm0
+ +[a-f0-9]+: c4 e2 79 50 c0 \{vex\} vpdpbusd %xmm0,%xmm0,%xmm0
+ +[a-f0-9]+: c4 e2 7d 50 c0 \{vex\} vpdpbusd %ymm0,%ymm0,%ymm0
+ +[a-f0-9]+: c4 e2 79 50 c0 \{vex\} vpdpbusd %xmm0,%xmm0,%xmm0
+[a-f0-9]+: 62 f2 5d 08 50 d2 vpdpbusd %xmm2,%xmm4,%xmm2
#pass
diff --git a/gas/testsuite/gas/i386/avx-vnni.s b/gas/testsuite/gas/i386/avx-vnni.s
index b37bc85..e2b793b 100644
--- a/gas/testsuite/gas/i386/avx-vnni.s
+++ b/gas/testsuite/gas/i386/avx-vnni.s
@@ -16,5 +16,24 @@ _start:
test_insn vpdpbusds
test_insn vpdpwssds
+ .arch .noavx512vl
+
+ vpdpbusd %zmm0, %zmm0, %zmm0
+ vpdpbusd %ymm0, %ymm0, %ymm0
+ vpdpbusd %xmm0, %xmm0, %xmm0
+
+ .arch default
+ .arch .noavx512_vnni
+
+ vpdpbusd %ymm0, %ymm0, %ymm0
+ vpdpbusd %xmm0, %xmm0, %xmm0
+
+ .arch default
+ .arch .noavx512f
+
+ vpdpbusd %ymm0, %ymm0, %ymm0
+ vpdpbusd %xmm0, %xmm0, %xmm0
+
+ .arch default
.arch .avx_vnni
vpdpbusd %xmm2, %xmm4, %xmm2
diff --git a/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.l b/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.l
index a276b37..6180866 100644
--- a/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.l
@@ -1,3 +1,4 @@
.* Assembler messages:
-.*:6: Error: unsupported instruction `vpdpbusds'
-.*:7: Error: unsupported instruction `vpdpbusds'
+.*:6: Error: unsupported .* `vpdpbusds'
+.*:7: Error: unsupported .* `vpdpbusds'
+.*:8: Error: operand .* `vpdpbusds'
diff --git a/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.s b/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.s
index f621ef4..8b1b80c 100644
--- a/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.s
+++ b/gas/testsuite/gas/i386/x86-64-avx-vnni-inval.s
@@ -3,5 +3,6 @@
.text
.arch .noavx512_vnni
_start:
- vpdpbusds %xmm2, %xmm4, %xmm2
- vpdpbusds %xmm22, %xmm4, %xmm2
+ vpdpbusds %xmm2, %xmm4, %xmm2{%k6}
+ vpdpbusds %xmm22, %xmm4, %xmm2{%k1}
+ vpdpbusds %zmm2, %zmm4, %zmm2