]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ix86/Intel: don't require memory operand size specifier for PTWRITE
authorJan Beulich <jbeulich@novell.com>
Thu, 16 Nov 2017 11:28:06 +0000 (12:28 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 16 Nov 2017 11:28:06 +0000 (12:28 +0100)
Other than in 64-bit mode, in 32- and 16-bit modes operand size isn't
ambiguous.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/ptwrite-intel.d
gas/testsuite/gas/i386/ptwrite.d
gas/testsuite/gas/i386/ptwrite.s

index eae7a295155603363d42e4f7f6dad45d7c7c2ead..e1aacffd964059390a30b17d38b013df6f700b08 100644 (file)
@@ -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
index f20be8ef9dc07b3c5dc192be3f2a4852b4d843a7..5a7066c1dd63d098b596b85a81b9a760a3bccdd2 100644 (file)
@@ -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.  */
index d39609aef7d94cf8c85399f597c5aa05687cbaca..f0f2aad2f9e3de727992a46527026d8c242fd943 100644 (file)
@@ -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
index 399c74042937c02971af9ed67566823c525425cf..31552bce915431e8bab5bc2969f9b9fd31f0eb07 100644 (file)
@@ -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
index 3aa4be7c847098ad47dfde187c23e00cf1e5479a..61efd7e12835e526dea4e3dd6c12d1549c6e3766 100644 (file)
@@ -9,4 +9,5 @@ _start:
 
        .intel_syntax noprefix
        ptwrite ecx
+       ptwrite [ecx]
        ptwrite DWORD PTR [ecx]