This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed, PATCH] Check dp->prefix_requirement instead
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Wed, 15 Apr 2015 11:29:44 -0700
- Subject: [committed, PATCH] Check dp->prefix_requirement instead
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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.
---
opcodes/ChangeLog | 6 ++++++
opcodes/i386-dis.c | 6 +-----
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
--
1.9.3