aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-09-14 12:21:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-09-14 12:21:19 -0700
commit606cc04085a08f5e04eda6ef67f516bf81b691a1 (patch)
tree6274c82a1ad49e40aeae70671521ed2f3120c6fa
parent6865c0435a54e6d5f1fcc5cdcd56895e9a3c5484 (diff)
downloadgdb-606cc04085a08f5e04eda6ef67f516bf81b691a1.zip
gdb-606cc04085a08f5e04eda6ef67f516bf81b691a1.tar.gz
gdb-606cc04085a08f5e04eda6ef67f516bf81b691a1.tar.bz2
x86: Check non-WIG EVEX instruction encoding with -mevexwig=1
Verify that -mevexwig=1 has no impact on non-WIG EVEX instruction encoding. PR gas/23642 * testsuite/gas/i386/evex-wig2.d: New file. * testsuite/gas/i386/evex-wig2.s: Likewise. * testsuite/gas/i386/x86-64-evex-wig2.d: Likewise. * testsuite/gas/i386/x86-64-evex-wig2.s: Likewise. * testsuite/gas/i386/i386.exp: Run evex-wig2 and x86-64-evex-wig2.
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/testsuite/gas/i386/evex-wig2.d17
-rw-r--r--gas/testsuite/gas/i386/evex-wig2.s11
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/x86-64-evex-wig2.d17
-rw-r--r--gas/testsuite/gas/i386/x86-64-evex-wig2.s11
6 files changed, 68 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ff09469..82a23c4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,6 +1,16 @@
2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
PR gas/23642
+ * testsuite/gas/i386/evex-wig2.d: New file.
+ * testsuite/gas/i386/evex-wig2.s: Likewise.
+ * testsuite/gas/i386/x86-64-evex-wig2.d: Likewise.
+ * testsuite/gas/i386/x86-64-evex-wig2.s: Likewise.
+ * testsuite/gas/i386/i386.exp: Run evex-wig2 and
+ x86-64-evex-wig2.
+
+2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/23642
* config/tc-i386.c (build_vex_prefix): Check VEXWIG when setting
the VEX.W bit.
(build_evex_prefix): Check VEXWIG when setting the EVEX.W bit.
diff --git a/gas/testsuite/gas/i386/evex-wig2.d b/gas/testsuite/gas/i386/evex-wig2.d
new file mode 100644
index 0000000..753aad4
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-wig2.d
@@ -0,0 +1,17 @@
+#as: -mevexwig=1
+#objdump: -dw
+#name: i386 non-WIG EVEX insns with -mevexwig=1
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: 62 f1 56 38 2a f0 vcvtsi2ss %eax,\{rd-sae\},%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 56 08 2a f0 vcvtsi2ss %eax,%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 57 08 2a f0 vcvtsi2sd %eax,%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 56 38 7b f0 vcvtusi2ss %eax,\{rd-sae\},%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 56 08 7b f0 vcvtusi2ss %eax,%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 57 08 7b f0 vcvtusi2sd %eax,%xmm5,%xmm6
+#pass
diff --git a/gas/testsuite/gas/i386/evex-wig2.s b/gas/testsuite/gas/i386/evex-wig2.s
new file mode 100644
index 0000000..df775df
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-wig2.s
@@ -0,0 +1,11 @@
+# Check non-WIG EVEX instructions with -mevexwig=1
+
+ .allow_index_reg
+ .text
+_start:
+ vcvtsi2ss %eax, {rd-sae}, %xmm5, %xmm6
+ {evex} vcvtsi2ss %eax, %xmm5, %xmm6
+ {evex} vcvtsi2sd %eax, %xmm5, %xmm6
+ vcvtusi2ss %eax, {rd-sae}, %xmm5, %xmm6
+ {evex} vcvtusi2ss %eax, %xmm5, %xmm6
+ {evex} vcvtusi2sd %eax, %xmm5, %xmm6
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 203def9..bd7acd1 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -233,6 +233,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "evex-lig512-intel"
run_dump_test "evex-wig1"
run_dump_test "evex-wig1-intel"
+ run_dump_test "evex-wig2"
run_dump_test "sse2avx"
run_list_test "inval-avx" "-al"
run_list_test "inval-avx512f" "-al"
@@ -748,6 +749,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-evex-lig512-intel"
run_dump_test "x86-64-evex-wig1"
run_dump_test "x86-64-evex-wig1-intel"
+ run_dump_test "x86-64-evex-wig2"
run_dump_test "x86-64-sse2avx"
run_list_test "x86-64-inval-avx" "-al"
run_list_test "x86-64-inval-avx512f" "-al"
diff --git a/gas/testsuite/gas/i386/x86-64-evex-wig2.d b/gas/testsuite/gas/i386/x86-64-evex-wig2.d
new file mode 100644
index 0000000..adf736d
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-evex-wig2.d
@@ -0,0 +1,17 @@
+#as: -mevexwig=1
+#objdump: -dw
+#name: x86-64 non-WIG EVEX insns with -mevexwig=1
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: 62 f1 36 30 2a f0 vcvtsi2ss %eax,\{rd-sae\},%xmm25,%xmm6
+ +[a-f0-9]+: 62 f1 36 00 2a f0 vcvtsi2ss %eax,%xmm25,%xmm6
+ +[a-f0-9]+: 62 f1 37 00 2a f0 vcvtsi2sd %eax,%xmm25,%xmm6
+ +[a-f0-9]+: 62 f1 36 30 7b f0 vcvtusi2ss %eax,\{rd-sae\},%xmm25,%xmm6
+ +[a-f0-9]+: 62 f1 36 00 7b f0 vcvtusi2ss %eax,%xmm25,%xmm6
+ +[a-f0-9]+: 62 f1 07 08 7b f0 vcvtusi2sd %eax,%xmm15,%xmm6
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-evex-wig2.s b/gas/testsuite/gas/i386/x86-64-evex-wig2.s
new file mode 100644
index 0000000..5fb1782
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-evex-wig2.s
@@ -0,0 +1,11 @@
+# Check non-WIG EVEX instructions with -mevexwig=1
+
+ .allow_index_reg
+ .text
+_start:
+ vcvtsi2ss %eax, {rd-sae}, %xmm25, %xmm6
+ vcvtsi2ss %eax, %xmm25, %xmm6
+ vcvtsi2sd %eax, %xmm25, %xmm6
+ vcvtusi2ss %eax, {rd-sae}, %xmm25, %xmm6
+ vcvtusi2ss %eax, %xmm25, %xmm6
+ vcvtusi2sd %eax, %xmm15, %xmm6