aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-15 11:28:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-15 11:28:16 -0700
commit3888916da84288994be10d6ae1a2db5b45b3f8f8 (patch)
tree2ed8b8ddea0cd0ee2342e30e97776eccb6e45e34 /opcodes
parentf24bcbaa5a6e30556e2da20bfd78e7823741475a (diff)
downloadgdb-3888916da84288994be10d6ae1a2db5b45b3f8f8.zip
gdb-3888916da84288994be10d6ae1a2db5b45b3f8f8.tar.gz
gdb-3888916da84288994be10d6ae1a2db5b45b3f8f8.tar.bz2
Check dp->prefix_requirement instead
This patch removes prefix_requirement and checks dp->prefix_requirement instead. * i386-dis.c (prefix_requirement): Removed. (print_insn): Don't set prefix_requirement. Check dp->prefix_requirement instead of prefix_requirement.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/i386-dis.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index b46c861..0742ccc 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,11 @@
2015-04-15 H.J. Lu <hongjiu.lu@intel.com>
+ * i386-dis.c (prefix_requirement): Removed.
+ (print_insn): Don't set prefix_requirement. Check
+ dp->prefix_requirement instead of prefix_requirement.
+
+2015-04-15 H.J. Lu <hongjiu.lu@intel.com>
+
PR binutils/17898
* i386-dis.c (PREFIX_0FC7_REG_6): Renamed to ...
(PREFIX_MOD_0_0FC7_REG_6): This.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 76ecb5a..ca9ea2d 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -3082,8 +3082,6 @@ static int last_addr_prefix;
static int last_rex_prefix;
static int last_seg_prefix;
static int fwait_prefix;
-/* The PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is mandatory. */
-static int prefix_requirement;
/* The active segment register prefix. */
static int active_seg_prefix;
#define MAX_CODE_LENGTH 15
@@ -13053,14 +13051,12 @@ print_insn (bfd_vma pc, disassemble_info *info)
threebyte = *++codep;
dp = &dis386_twobyte[threebyte];
need_modrm = twobyte_has_modrm[*codep];
- prefix_requirement = dp->prefix_requirement;
codep++;
}
else
{
dp = &dis386[*codep];
need_modrm = onebyte_has_modrm[*codep];
- prefix_requirement = 0;
codep++;
}
@@ -13160,7 +13156,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
used by putop and MMX/SSE operand and may be overriden by the
PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
separately. */
- if (prefix_requirement == PREFIX_OPCODE
+ if (dp->prefix_requirement == PREFIX_OPCODE
&& dp != &bad_opcode
&& (((prefixes
& (PREFIX_REPZ | PREFIX_REPNZ)) != 0