From: H.J. Lu Date: Wed, 15 Apr 2015 18:28:16 +0000 (-0700) Subject: Check dp->prefix_requirement instead X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3888916da84288994be10d6ae1a2db5b45b3f8f8;p=binutils-gdb.git 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. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index b46c8610325..0742cccce17 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2015-04-15 H.J. Lu + + * 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 PR binutils/17898 diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 76ecb5a78bb..ca9ea2deb4e 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