This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ix86/Intel: don't require memory operand size specifier for PTWRITE


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c2b9da16088f8c500ab93e9a4e3001ab7393cb38

commit c2b9da16088f8c500ab93e9a4e3001ab7393cb38
Author: Jan Beulich <jbeulich@novell.com>
Date:   Thu Nov 16 12:28:06 2017 +0100

    ix86/Intel: don't require memory operand size specifier for PTWRITE
    
    Other than in 64-bit mode, in 32- and 16-bit modes operand size isn't
    ambiguous.

Diff:
---
 gas/ChangeLog                          | 9 +++++++++
 gas/config/tc-i386.c                   | 2 +-
 gas/testsuite/gas/i386/ptwrite-intel.d | 1 +
 gas/testsuite/gas/i386/ptwrite.d       | 1 +
 gas/testsuite/gas/i386/ptwrite.s       | 1 +
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index eae7a29..e1aacff 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2017-11-16  Jan Beulich  <jbeulich@suse.com>
+
+	* config/tc-i386.c (process_suffix): Ignore .no_qsuf outside of
+	64-bit mode.
+	* testsuite/gas/i386/ptwrite.s: Add test for memory operand
+	without DWORD PTR.
+	* testsuite/gas/i386/ptwrite.d,
+	testsuite/gas/i386/ptwrite-intel.d: Adjust expectations.
+
 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* testsuite/gas/i386/noextreg.s: Replace .code64/.code32 and
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index f20be8e..5a7066c 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5565,7 +5565,7 @@ process_suffix (void)
 	    suffixes |= 1 << 3;
 	  if (!i.tm.opcode_modifier.no_ssuf)
 	    suffixes |= 1 << 4;
-	  if (!i.tm.opcode_modifier.no_qsuf)
+	  if (flag_code == CODE_64BIT && !i.tm.opcode_modifier.no_qsuf)
 	    suffixes |= 1 << 5;
 
 	  /* There are more than suffix matches.  */
diff --git a/gas/testsuite/gas/i386/ptwrite-intel.d b/gas/testsuite/gas/i386/ptwrite-intel.d
index d39609a..f0f2aad 100644
--- a/gas/testsuite/gas/i386/ptwrite-intel.d
+++ b/gas/testsuite/gas/i386/ptwrite-intel.d
@@ -15,4 +15,5 @@ Disassembly of section \.text:
  +[a-f0-9]+:	f3 0f ae 21          	ptwrite DWORD PTR \[ecx\]
  +[a-f0-9]+:	f3 0f ae e1          	ptwrite ecx
  +[a-f0-9]+:	f3 0f ae 21          	ptwrite DWORD PTR \[ecx\]
+ +[a-f0-9]+:	f3 0f ae 21          	ptwrite DWORD PTR \[ecx\]
 #pass
diff --git a/gas/testsuite/gas/i386/ptwrite.d b/gas/testsuite/gas/i386/ptwrite.d
index 399c740..31552bc 100644
--- a/gas/testsuite/gas/i386/ptwrite.d
+++ b/gas/testsuite/gas/i386/ptwrite.d
@@ -15,4 +15,5 @@ Disassembly of section \.text:
  +[a-f0-9]+:	f3 0f ae 21          	ptwritel \(%ecx\)
  +[a-f0-9]+:	f3 0f ae e1          	ptwrite %ecx
  +[a-f0-9]+:	f3 0f ae 21          	ptwritel \(%ecx\)
+ +[a-f0-9]+:	f3 0f ae 21          	ptwritel \(%ecx\)
 #pass
diff --git a/gas/testsuite/gas/i386/ptwrite.s b/gas/testsuite/gas/i386/ptwrite.s
index 3aa4be7..61efd7e 100644
--- a/gas/testsuite/gas/i386/ptwrite.s
+++ b/gas/testsuite/gas/i386/ptwrite.s
@@ -9,4 +9,5 @@ _start:
 
 	.intel_syntax noprefix
 	ptwrite ecx
+	ptwrite [ecx]
 	ptwrite DWORD PTR [ecx]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]