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] Check addr32flag instead of sizeflag for rip/eip


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

commit 285963233bc7509edb07c035426ee0096650b0af
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Oct 18 09:06:27 2016 -0700

    Check addr32flag instead of sizeflag for rip/eip
    
    Since the address size prefix, 0x67, is ignored for MPX instructions in
    64-bit mode, we should check addr32flag instead of sizeflag for rip/eip.
    
    	PR binutis/20699
    	* i386-dis.c (OP_E_memory): Check addr32flag instead of sizeflag
    	for rip/eip.

Diff:
---
 opcodes/ChangeLog  | 6 ++++++
 opcodes/i386-dis.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 2b93ed2..36ed580 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,11 @@
 2016-10-18  H.J. Lu  <hongjiu.lu@intel.com>
 
+	PR binutis/20699
+	* i386-dis.c (OP_E_memory): Check addr32flag in stead of
+	sizeflag.
+
+2016-10-18  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR binutis/20704
 	* i386-dis.c (three_byte_table): Remove the remaining SSE5 support.
 
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index cd1321f..4624a6a 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -15523,7 +15523,7 @@ OP_E_memory (int bytemode, int sizeflag)
 	    if (riprel)
 	      {
 		set_op (disp, 1);
-		oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
+		oappend (!addr32flag ? "(%rip)" : "(%eip)");
 	      }
 	  }
 
@@ -15538,7 +15538,7 @@ OP_E_memory (int bytemode, int sizeflag)
 	  if (intel_syntax && riprel)
 	    {
 	      set_op (disp, 1);
-	      oappend (sizeflag & AFLAG ? "rip" : "eip");
+	      oappend (!addr32flag ? "rip" : "eip");
 	    }
 	  *obufp = '\0';
 	  if (havebase)


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