aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-06-09 08:46:22 +0200
committerJan Beulich <jbeulich@suse.com>2020-06-09 08:46:22 +0200
commitda4977e00b73835180ccbce8a2046705fd8ade62 (patch)
treeedb1fa324d09080d8f375d40dd3db17ba7b3a02f /gas/testsuite
parentefb2a7b412c2c78eaf6d3b63f153a749fcde292c (diff)
downloadgdb-da4977e00b73835180ccbce8a2046705fd8ade62.zip
gdb-da4977e00b73835180ccbce8a2046705fd8ade62.tar.gz
gdb-da4977e00b73835180ccbce8a2046705fd8ade62.tar.bz2
x86: don't ignore mandatory pseudo prefixes
{vex}, {vex3}, and {evex} are mandatory prefixes, and hence should not be randomly ignored. Fix this for insns without operands as well as for insns referencing the high 16 [XYZ]MM registers. To achieve the former, re-purpose VEX_check_operands(), renaming it to VEX_check_encoding() and moving its only operand check to check_VecOperands(). This involves fixing a testcase relying on {vex2} to get ignored.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/pseudos-bad.l9
-rw-r--r--gas/testsuite/gas/i386/pseudos-bad.s13
-rw-r--r--gas/testsuite/gas/i386/xmmhi64.s6
4 files changed, 27 insertions, 3 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 86dc1e4..7494afd 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -492,6 +492,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_list_test "cet-ibt-inval"
run_list_test "cet-shstk-inval"
run_dump_test "pseudos"
+ run_list_test "pseudos-bad"
run_dump_test "notrack"
run_dump_test "notrack-intel"
run_list_test "notrackbad" "-al"
@@ -1074,6 +1075,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_list_test "x86-64-cet-ibt-inval"
run_list_test "x86-64-cet-shstk-inval"
run_dump_test "x86-64-pseudos"
+ run_list_test "x86-64-pseudos-bad"
run_dump_test "x86-64-notrack"
run_dump_test "x86-64-notrack-intel"
run_list_test "x86-64-notrackbad" "-al"
diff --git a/gas/testsuite/gas/i386/pseudos-bad.l b/gas/testsuite/gas/i386/pseudos-bad.l
new file mode 100644
index 0000000..7fbe187
--- /dev/null
+++ b/gas/testsuite/gas/i386/pseudos-bad.l
@@ -0,0 +1,9 @@
+.*: Assembler messages:
+.*:3: Error: .*`nop'.*
+.*:4: Error: .*`nop'.*
+.*:6: Error: .*`nop'.*
+.*:7: Error: .*`nop'.*
+.*:9: Error: .*`nop'.*
+.*:10: Error: .*`nop'.*
+.*:12: Error: .*`vzeroall'.*
+.*:13: Error: .*`vmovmskps'.*
diff --git a/gas/testsuite/gas/i386/pseudos-bad.s b/gas/testsuite/gas/i386/pseudos-bad.s
new file mode 100644
index 0000000..0d57cbf
--- /dev/null
+++ b/gas/testsuite/gas/i386/pseudos-bad.s
@@ -0,0 +1,13 @@
+ .text
+pseudos:
+ {vex} nop
+ {vex} nop %eax
+
+ {vex3} nop
+ {vex3} nop %eax
+
+ {evex} nop
+ {evex} nop %eax
+
+ {evex} vzeroall
+ {evex} vmovmskps %xmm0, %eax
diff --git a/gas/testsuite/gas/i386/xmmhi64.s b/gas/testsuite/gas/i386/xmmhi64.s
index 4a70cf7..ecac05c 100644
--- a/gas/testsuite/gas/i386/xmmhi64.s
+++ b/gas/testsuite/gas/i386/xmmhi64.s
@@ -2,6 +2,6 @@
.intel_syntax noprefix
.code64
xmm:
- {vex2} vaddps xmm0, xmm1, xmm16
- {vex2} vaddps ymm0, ymm1, ymm16
- {vex2} vaddps zmm0, zmm1, zmm16
+ vaddps xmm0, xmm1, xmm16
+ vaddps ymm0, ymm1, ymm16
+ vaddps zmm0, zmm1, zmm16