This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[PATCH] PR gdb/16305: Mask out PREFIX_ADDR when adding prefix to opcode


PREFIX_ADDR isn't a prefix to opcode.  This patch masks out PREFIX_ADDR
when adding prefix to opcode. Tested on Linux/x86-64.  OK to install?

Thanks.

H.J.
---
2013-12-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR gdb/16305
	* i386-tdep.c (i386_process_record): Mask out PREFIX_ADDR when
	adding prefix to opcode.
---
 gdb/i386-tdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 371d5f0..6635a25 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -7031,7 +7031,8 @@ no_support_3dnow_data:
     case 0x0ffc:
     case 0x0ffd:
     case 0x0ffe:
-      switch (prefixes)
+      /* Mask out PREFIX_ADDR.  */
+      switch ((prefixes & ~PREFIX_ADDR))
         {
         case PREFIX_REPNZ:
           opcode |= 0xf20000;
-- 
1.8.3.1


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