This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR binutils/16891: Handle prefixes before fwait
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Fri, 2 May 2014 08:41:16 -0700
- Subject: Re: [PATCH] PR binutils/16891: Handle prefixes before fwait
- Authentication-results: sourceware.org; auth=none
- References: <20140501164625 dot GA14171 at intel dot com>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Thu, May 01, 2014 at 09:46:25AM -0700, H.J. Lu wrote:
> 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. I checked it in.
>
>
> H.J.
> ---
> 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.
I checked in this patch to move fwait test with prefix to prefix.s.
H.J.
---
gas/testsuite/ChangeLog | 10 ++++++++++
gas/testsuite/gas/i386/opcode-intel.d | 2 --
gas/testsuite/gas/i386/opcode-suffix.d | 2 --
gas/testsuite/gas/i386/opcode.d | 2 --
gas/testsuite/gas/i386/opcode.s | 3 ---
gas/testsuite/gas/i386/prefix.d | 1 +
gas/testsuite/gas/i386/prefix.s | 2 ++
7 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d59d640..928adc4 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2014-05-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/opcode-intel.d: Undo the last change.
+ * gas/i386/opcode-suffix.d: Likewise.
+ * gas/i386/opcode.d: Likewise.
+ * gas/i386/opcode.s: Likewise.
+
+ * gas/i386/prefix.s: Add test for fwait with prefix.
+ * gas/i386/prefix.d: Updated.
+
2014-05-01 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/16891
diff --git a/gas/testsuite/gas/i386/opcode-intel.d b/gas/testsuite/gas/i386/opcode-intel.d
index a1ebe45..23b7afa 100644
--- a/gas/testsuite/gas/i386/opcode-intel.d
+++ b/gas/testsuite/gas/i386/opcode-intel.d
@@ -592,6 +592,4 @@ 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 21ad22b..74e0adb 100644
--- a/gas/testsuite/gas/i386/opcode-suffix.d
+++ b/gas/testsuite/gas/i386/opcode-suffix.d
@@ -592,6 +592,4 @@ 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 371e40a..1a94fc8 100644
--- a/gas/testsuite/gas/i386/opcode.d
+++ b/gas/testsuite/gas/i386/opcode.d
@@ -591,6 +591,4 @@ 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 72333a5..a07e423 100644
--- a/gas/testsuite/gas/i386/opcode.s
+++ b/gas/testsuite/gas/i386/opcode.s
@@ -589,6 +589,3 @@ foo:
cmovpo 0x90909090(%eax),%edx
cmovpe 0x90909090(%eax),%dx
cmovpo 0x90909090(%eax),%dx
-
- es fwait
- fwait
diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d
index e155230..4139658 100644
--- a/gas/testsuite/gas/i386/prefix.d
+++ b/gas/testsuite/gas/i386/prefix.d
@@ -11,4 +11,5 @@ Disassembly of section .text:
8: 9b df e0 [ ]*fstsw %ax
b: 9b 67 df e0 [ ]*addr16 fstsw %ax
f: 36 67 66 f3 a7 [ ]*repz cmpsw %es:\(%di\),%ss:\(%si\)
+ 14: 26 9b[ ]*es fwait
#pass
diff --git a/gas/testsuite/gas/i386/prefix.s b/gas/testsuite/gas/i386/prefix.s
index a141ad5..2bf3c71 100644
--- a/gas/testsuite/gas/i386/prefix.s
+++ b/gas/testsuite/gas/i386/prefix.s
@@ -2,5 +2,7 @@
fstsw; fstsw %ax;
addr16 fstsw %ax ;addr16 rep cmpsw %es:(%di),%ss:(%si)
+ es fwait
+
# Get a good alignment.
.p2align 4,0
--
1.9.0