aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-04-04 04:36:44 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-04-04 04:36:44 -0700
commitcaf0678c84b5b55fbc4bcc853954745a4ad8b658 (patch)
tree659854869daa9b3293528a92e33aea9d6644bc65 /gas
parent142b7a144b46af91cd59a41a8f87f5f3b0338cdf (diff)
downloadgdb-caf0678c84b5b55fbc4bcc853954745a4ad8b658.zip
gdb-caf0678c84b5b55fbc4bcc853954745a4ad8b658.tar.gz
gdb-caf0678c84b5b55fbc4bcc853954745a4ad8b658.tar.bz2
i386: Clear vex instead of vex.evex
"vex" has many fields to control how to decode an instruction. Clear all fields in "vex" before decoding an instruction to avoid using values left from the previous instruction. gas/ PR binutils/23025 * testsuite/gas/i386/prefix.s: Add tests for vcvtpd2dq with VEX and EVEX prefixes. * testsuite/gas/i386/prefix.d: Updated. opcodes/ PR binutils/23025 * i386-dis.c (get_valid_dis386): Don't set vex.prefix nor vex.w to 0. (print_insn): Clear vex instead of vex.evex.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/prefix.d3
-rw-r--r--gas/testsuite/gas/i386/prefix.s4
3 files changed, 14 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d0f047e..17d1b17 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2018-04-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/23025
+ * testsuite/gas/i386/prefix.s: Add tests for vcvtpd2dq with
+ VEX and EVEX prefixes.
+ * testsuite/gas/i386/prefix.d: Updated.
+
2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
PR binutils/23013
diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d
index 8dd200b..e9ad5eb 100644
--- a/gas/testsuite/gas/i386/prefix.d
+++ b/gas/testsuite/gas/i386/prefix.d
@@ -72,5 +72,8 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 90 nop
[ ]*[a-f0-9]+: f2 0f c7 \(bad\)
[ ]*[a-f0-9]+: f0 90 lock nop
+[ ]*[a-f0-9]+: c5 fb e6 40 20 vcvtpd2dqx 0x20\(%eax\),%xmm0
+[ ]*[a-f0-9]+: 62 f1 ff 18 e6 40 04 vcvtpd2dq 0x20\(%eax\)\{1to2\},%xmm0
+[ ]*[a-f0-9]+: c5 fb e6 40 20 vcvtpd2dqx 0x20\(%eax\),%xmm0
...
#pass
diff --git a/gas/testsuite/gas/i386/prefix.s b/gas/testsuite/gas/i386/prefix.s
index 12d8bbc..a4c60a7 100644
--- a/gas/testsuite/gas/i386/prefix.s
+++ b/gas/testsuite/gas/i386/prefix.s
@@ -391,5 +391,9 @@
nop
+ vcvtpd2dqx 0x20(%eax),%xmm0
+ vcvtpd2dq 0x20(%eax){1to2},%xmm0
+ vcvtpd2dqx 0x20(%eax),%xmm0
+
# Get a good alignment.
.p2align 4,0