aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-25 08:19:21 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-25 08:19:21 +0100
commit5364285240737423a4d6368aba803a031d293b95 (patch)
tree93558016404461968935f1d30751cd8e50dbfc01 /gas
parentc0e54661f755b1eb1cbf745bc4eb4a068cd5ada2 (diff)
downloadgdb-5364285240737423a4d6368aba803a031d293b95.zip
gdb-5364285240737423a4d6368aba803a031d293b95.tar.gz
gdb-5364285240737423a4d6368aba803a031d293b95.tar.bz2
x86: flag as bad AVX512 insns with EVEX.z set but EVEX.aaa clear
This combination makes no sense and is documented to cause #UD.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/testsuite/gas/i386/avx512f-nondef.d4
-rw-r--r--gas/testsuite/gas/i386/avx512f-nondef.s2
3 files changed, 11 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0c99e51..02cef3c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2021-03-25 Jan Beulich <jbeulich@suse.com>
+ * testsuite/gas/i386/avx512f-nondef.s: Add case for EVEX.z
+ without mask register.
+ * testsuite/gas/i386/avx512f-nondef.d: Adjust expectations.
+
+2021-03-25 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386.c (md_assemble): Widen set of insns to avoid
swapping operands for.
* testsuite/gas/i386/invlpgb.s: Fix, re-arrange, and add Intel
diff --git a/gas/testsuite/gas/i386/avx512f-nondef.d b/gas/testsuite/gas/i386/avx512f-nondef.d
index d768b7c..6a9c5d3 100644
--- a/gas/testsuite/gas/i386/avx512f-nondef.d
+++ b/gas/testsuite/gas/i386/avx512f-nondef.d
@@ -1,6 +1,6 @@
#as:
#objdump: -dw
-#name: i386 AVX512F insns with nondefault values in ignored bits
+#name: i386 AVX512F insns with nondefault values in ignored / reserved bits
.*: +file format .*
@@ -16,4 +16,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 62 vpmovdb %zmm6,\(bad\)
[ ]*[a-f0-9]+: f2 7e 58 bnd jle (0x7d|7d <.text\+0x7d>)
[ ]*[a-f0-9]+: 31 72 7f xor %esi,0x7f\(%edx\)
+[ ]*[a-f0-9]+: 62 f1 7c 88 58 \(bad\)
+[ ]*[a-f0-9]+: c3 ret *
#pass
diff --git a/gas/testsuite/gas/i386/avx512f-nondef.s b/gas/testsuite/gas/i386/avx512f-nondef.s
index 255d2c9..b8b14fd 100644
--- a/gas/testsuite/gas/i386/avx512f-nondef.s
+++ b/gas/testsuite/gas/i386/avx512f-nondef.s
@@ -13,3 +13,5 @@
.byte 0x62, 0xf2, 0x7e, 0x48, 0x31, 0x72, 0x7f
# vpmovdb %zmm6, 2032(%rdx) # with set EVEX.B bit - we should get (bad) operand
.byte 0x62, 0xf2, 0x7e, 0x58, 0x31, 0x72, 0x7f
+# vaddps xmm0, xmm0, xmm3 # with EVEX.z set
+.byte 0x62, 0xf1, 0x7c, 0x88, 0x58, 0xc3