aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-09-17 09:33:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-09-17 09:33:35 -0700
commit04e2a1829ea137ac23ac96e98fd60f9d720dcdcb (patch)
tree6d9faae8d1067468634733e7b98c690cf8eae58d /gas
parentd5f787c2bc90793c1d781b7291758e77067daad5 (diff)
downloadgdb-04e2a1829ea137ac23ac96e98fd60f9d720dcdcb.zip
gdb-04e2a1829ea137ac23ac96e98fd60f9d720dcdcb.tar.gz
gdb-04e2a1829ea137ac23ac96e98fd60f9d720dcdcb.tar.bz2
x86: Set EVex=2 on EVEX.128 only vmovd and vmovq
EVEX "VMOVD xmm1, r32/m32", "VMOVD r32/m32, xmm2", "VMOVQ xmm1, r64/m64", "VMOVD r64/m64, xmm2", "VMOVQ xmm1, xmm2/m64" and "VMOVQ xmm1/m64, xmm2" can only be encoded with EVEX.128. Set EVex=2 on EVEX.128 only vmovd and vmovq. gas/ PR gas/23670 * testsuite/gas/i386/evex-lig-2.d: New file. * testsuite/gas/i386/evex-lig-2.s: Likewise. * testsuite/gas/i386/x86-64-evex-lig-2.d: Likewise. * testsuite/gas/i386/x86-64-evex-lig-2.s: Likewise. * testsuite/gas/i386/i386.exp: Run evex-lig-2 and x86-64-evex-lig-2. opcodes/ PR gas/23670 * i386-dis-evex.h (evex_table): Use EVEX_LEN_0F6E_P_2, EVEX_LEN_0F7E_P_1, EVEX_LEN_0F7E_P_2 and EVEX_LEN_0FD6_P_2. (EVEX_LEN_0F6E_P_2): New EVEX_LEN_TABLE entry. (EVEX_LEN_0F7E_P_1): Likewise. (EVEX_LEN_0F7E_P_2): Likewise. (EVEX_LEN_0FD6_P_2): Likewise. * i386-dis.c (USE_EVEX_LEN_TABLE): New. (EVEX_LEN_TABLE): Likewise. (EVEX_LEN_0F6E_P_2): New enum. (EVEX_LEN_0F7E_P_1): Likewise. (EVEX_LEN_0F7E_P_2): Likewise. (EVEX_LEN_0FD6_P_2): Likewise. (evex_len_table): New. (get_valid_dis386): Handle USE_EVEX_LEN_TABLE. * i386-opc.tbl: Set EVex=2 on EVEX.128 only vmovd and vmovq. * i386-tbl.h: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/testsuite/gas/i386/evex-lig-2.d18
-rw-r--r--gas/testsuite/gas/i386/evex-lig-2.s14
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/x86-64-evex-lig-2.d20
-rw-r--r--gas/testsuite/gas/i386/x86-64-evex-lig-2.s15
6 files changed, 79 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4ea1d1c..3e76800 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,15 @@
2018-09-17 H.J. Lu <hongjiu.lu@intel.com>
+ PR gas/23670
+ * testsuite/gas/i386/evex-lig-2.d: New file.
+ * testsuite/gas/i386/evex-lig-2.s: Likewise.
+ * testsuite/gas/i386/x86-64-evex-lig-2.d: Likewise.
+ * testsuite/gas/i386/x86-64-evex-lig-2.s: Likewise.
+ * testsuite/gas/i386/i386.exp: Run evex-lig-2 and
+ x86-64-evex-lig-2.
+
+2018-09-17 H.J. Lu <hongjiu.lu@intel.com>
+
PR gas/23665
* testsuite/gas/i386/avx-scalar.s: Remove vmovq and vmovd tests.
* testsuite/gas/i386/x86-64-avx-scalar.s: Likewise.
diff --git a/gas/testsuite/gas/i386/evex-lig-2.d b/gas/testsuite/gas/i386/evex-lig-2.d
new file mode 100644
index 0000000..dddcc47
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-lig-2.d
@@ -0,0 +1,18 @@
+#as: -mevexlig=256
+#objdump: -dw
+#name: i386 EVEX non-LIG insns with -mevexlig=256
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: 62 f1 7d 08 7e 21 vmovd %xmm4,\(%ecx\)
+ +[a-f0-9]+: 62 f1 7d 08 7e e1 vmovd %xmm4,%ecx
+ +[a-f0-9]+: 62 f1 7d 08 6e 21 vmovd \(%ecx\),%xmm4
+ +[a-f0-9]+: 62 f1 7d 08 6e e1 vmovd %ecx,%xmm4
+ +[a-f0-9]+: 62 f1 fd 08 d6 21 vmovq %xmm4,\(%ecx\)
+ +[a-f0-9]+: 62 f1 fe 08 7e 21 vmovq \(%ecx\),%xmm4
+ +[a-f0-9]+: 62 f1 fe 08 7e f4 vmovq %xmm4,%xmm6
+#pass
diff --git a/gas/testsuite/gas/i386/evex-lig-2.s b/gas/testsuite/gas/i386/evex-lig-2.s
new file mode 100644
index 0000000..040f7fe
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-lig-2.s
@@ -0,0 +1,14 @@
+# Check EVEX non-LIG instructions with with -mevexlig=256
+
+ .allow_index_reg
+ .text
+_start:
+ {evex} vmovd %xmm4,(%ecx)
+ {evex} vmovd %xmm4,%ecx
+ {evex} vmovd (%ecx),%xmm4
+ {evex} vmovd %ecx,%xmm4
+
+ {evex} vmovq %xmm4,(%ecx)
+ {evex} vmovq (%ecx),%xmm4
+
+ {evex} vmovq %xmm4,%xmm6
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 150a0be..01be072 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -234,6 +234,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "evex-lig512"
run_dump_test "evex-lig256-intel"
run_dump_test "evex-lig512-intel"
+ run_dump_test "evex-lig-2"
run_dump_test "evex-wig1"
run_dump_test "evex-wig1-intel"
run_dump_test "evex-wig2"
@@ -753,6 +754,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-evex-lig512"
run_dump_test "x86-64-evex-lig256-intel"
run_dump_test "x86-64-evex-lig512-intel"
+ run_dump_test "x86-64-evex-lig-2"
run_dump_test "x86-64-evex-wig1"
run_dump_test "x86-64-evex-wig1-intel"
run_dump_test "x86-64-evex-wig2"
diff --git a/gas/testsuite/gas/i386/x86-64-evex-lig-2.d b/gas/testsuite/gas/i386/x86-64-evex-lig-2.d
new file mode 100644
index 0000000..ebdfe9b
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-evex-lig-2.d
@@ -0,0 +1,20 @@
+#as: -mevexlig=256
+#objdump: -dw
+#name: x86-64 EVEX non-LIG insns with -mevexlig=256
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: 62 f1 7d 08 7e 21 vmovd %xmm4,\(%rcx\)
+ +[a-f0-9]+: 62 f1 7d 08 7e e1 vmovd %xmm4,%ecx
+ +[a-f0-9]+: 62 f1 7d 08 6e 21 vmovd \(%rcx\),%xmm4
+ +[a-f0-9]+: 62 f1 7d 08 6e e1 vmovd %ecx,%xmm4
+ +[a-f0-9]+: 62 f1 fd 08 7e 21 vmovq %xmm4,\(%rcx\)
+ +[a-f0-9]+: 62 f1 fd 08 7e e1 vmovq %xmm4,%rcx
+ +[a-f0-9]+: 62 f1 fd 08 6e 21 vmovq \(%rcx\),%xmm4
+ +[a-f0-9]+: 62 f1 fd 08 6e e1 vmovq %rcx,%xmm4
+ +[a-f0-9]+: 62 f1 fe 08 7e f4 vmovq %xmm4,%xmm6
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-evex-lig-2.s b/gas/testsuite/gas/i386/x86-64-evex-lig-2.s
new file mode 100644
index 0000000..3261349
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-evex-lig-2.s
@@ -0,0 +1,15 @@
+# Check EVEX non-LIG instructions with with -mevexlig=256
+
+ .allow_index_reg
+ .text
+_start:
+ {evex} vmovd %xmm4,(%rcx)
+ {evex} vmovd %xmm4,%ecx
+ {evex} vmovd (%rcx),%xmm4
+ {evex} vmovd %ecx,%xmm4
+
+ {evex} vmovq %xmm4,(%rcx)
+ {evex} vmovq %xmm4,%rcx
+ {evex} vmovq (%rcx),%xmm4
+ {evex} vmovq %rcx,%xmm4
+ {evex} vmovq %xmm4,%xmm6