Mask out PREFIX_ADDR when adding prefix to opcode
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Dec 2013 22:28:18 +0000 (14:28 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Dec 2013 22:28:18 +0000 (14:28 -0800)
PREFIX_ADDR isn't a prefix to opcode.  This patch masks out PREFIX_ADDR
when adding prefix to opcode.

PR gdb/16305
* i386-tdep.c (i386_process_record): Mask out PREFIX_ADDR when
adding prefix to opcode.

gdb/ChangeLog
gdb/i386-tdep.c

index 76cedd74594f340b4356ae7f9bae569aba17ab5b..d885207b67d5ff25435dddd4fab7394dfd09e621 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-19  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.
+
 2013-12-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gdb/16304
index 8992088ea0f75070829511f4832b0094d456a560..4f86f0cb1a879b17e4e9ef8a1e932f05291c1e97 100644 (file)
@@ -7048,7 +7048,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;