aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-05-01 09:39:51 -0700
committerH.J. Lu <hjl.tools@gmail.com>2014-05-01 09:45:06 -0700
commit86a80a50f2cb244e6b9ec18b93675972baa50d78 (patch)
tree6b7c1691a09a08ff6819df9335af56bcc1a4f7f1 /gas
parentf8c2a73c881913a25c1cb5be766516a75588c7ab (diff)
downloadgdb-86a80a50f2cb244e6b9ec18b93675972baa50d78.zip
gdb-86a80a50f2cb244e6b9ec18b93675972baa50d78.tar.gz
gdb-86a80a50f2cb244e6b9ec18b93675972baa50d78.tar.bz2
Handle prefixes before fwait
0x9b (fwait) is both an instruction and an opcode prefix. When 0x9b is treated as an instruction, we need to handle any prefixes before it. This patch handles it properly. gas/testsuite/ PR binutils/16891 * gas/i386/opcode.s: Add test for fwait with prefix. * gas/i386/opcode-intel.d: Updated. * gas/i386/opcode-suffix.d: Likewise. * gas/i386/opcode.d: Likewise. opcodes/ PR binutils/16891 * i386-dis.c (print_insn): Handle prefixes before fwait.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/opcode-intel.d2
-rw-r--r--gas/testsuite/gas/i386/opcode-suffix.d2
-rw-r--r--gas/testsuite/gas/i386/opcode.d2
-rw-r--r--gas/testsuite/gas/i386/opcode.s3
5 files changed, 17 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index fac6a8b..d59d640 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2014-05-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/16891
+ * gas/i386/opcode.s: Add test for fwait with prefix.
+ * gas/i386/opcode-intel.d: Updated.
+ * gas/i386/opcode-suffix.d: Likewise.
+ * gas/i386/opcode.d: Likewise.
+
2014-04-23 Will Newton <will.newton@linaro.org>
* gas/arm/backslash-at.d: Fix dump output regexps for
diff --git a/gas/testsuite/gas/i386/opcode-intel.d b/gas/testsuite/gas/i386/opcode-intel.d
index 23b7afa..a1ebe45 100644
--- a/gas/testsuite/gas/i386/opcode-intel.d
+++ b/gas/testsuite/gas/i386/opcode-intel.d
@@ -592,4 +592,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 0f 4b 90 90 90 90 90 cmovnp edx,DWORD PTR \[eax-0x6f6f6f70\]
[ ]*[a-f0-9]+: 66 0f 4a 90 90 90 90 90 cmovp dx,WORD PTR \[eax-0x6f6f6f70\]
[ ]*[a-f0-9]+: 66 0f 4b 90 90 90 90 90 cmovnp dx,WORD PTR \[eax-0x6f6f6f70\]
+[ ]*[a-f0-9]+: 26 9b [ ]*es fwait
+[ ]*[a-f0-9]+: 9b [ ]*fwait
#pass
diff --git a/gas/testsuite/gas/i386/opcode-suffix.d b/gas/testsuite/gas/i386/opcode-suffix.d
index 74e0adb..21ad22b 100644
--- a/gas/testsuite/gas/i386/opcode-suffix.d
+++ b/gas/testsuite/gas/i386/opcode-suffix.d
@@ -592,4 +592,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 0f 4b 90 90 90 90 90 cmovnpl -0x6f6f6f70\(%eax\),%edx
[ ]*[a-f0-9]+: 66 0f 4a 90 90 90 90 90 cmovpw -0x6f6f6f70\(%eax\),%dx
[ ]*[a-f0-9]+: 66 0f 4b 90 90 90 90 90 cmovnpw -0x6f6f6f70\(%eax\),%dx
+[ ]*[a-f0-9]+: 26 9b [ ]*es fwait
+[ ]*[a-f0-9]+: 9b [ ]*fwait
#pass
diff --git a/gas/testsuite/gas/i386/opcode.d b/gas/testsuite/gas/i386/opcode.d
index 1a94fc8..371e40a 100644
--- a/gas/testsuite/gas/i386/opcode.d
+++ b/gas/testsuite/gas/i386/opcode.d
@@ -591,4 +591,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 0f 4b 90 90 90 90 90 cmovnp -0x6f6f6f70\(%eax\),%edx
[ ]*[a-f0-9]+: 66 0f 4a 90 90 90 90 90 cmovp -0x6f6f6f70\(%eax\),%dx
[ ]*[a-f0-9]+: 66 0f 4b 90 90 90 90 90 cmovnp -0x6f6f6f70\(%eax\),%dx
+[ ]*[a-f0-9]+: 26 9b [ ]*es fwait
+[ ]*[a-f0-9]+: 9b [ ]*fwait
#pass
diff --git a/gas/testsuite/gas/i386/opcode.s b/gas/testsuite/gas/i386/opcode.s
index a07e423..72333a5 100644
--- a/gas/testsuite/gas/i386/opcode.s
+++ b/gas/testsuite/gas/i386/opcode.s
@@ -589,3 +589,6 @@ foo:
cmovpo 0x90909090(%eax),%edx
cmovpe 0x90909090(%eax),%dx
cmovpo 0x90909090(%eax),%dx
+
+ es fwait
+ fwait