From d81afd0c0072f7fc79852573668c97c32dcb8323 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 10 Nov 2006 03:54:11 +0000 Subject: [PATCH] 2006-11-09 H.J. Lu * i386-dis.c (print_insn): Check PREFIX_REPNZ before PREFIX_DATA when prefix user table is used. --- opcodes/ChangeLog | 5 +++++ opcodes/i386-dis.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 6499aea2cbf..727170ee7c1 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2006-11-09 H.J. Lu + + * i386-dis.c (print_insn): Check PREFIX_REPNZ before + PREFIX_DATA when prefix user table is used. + 2006-11-09 H.J. Lu * i386-dis.c (twobyte_uses_SSE_prefix): Renamed to ... diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 0da2446f15e..caac903ca2f 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -3139,14 +3139,16 @@ print_insn (bfd_vma pc, disassemble_info *info) index = 1; else { - used_prefixes |= (prefixes & PREFIX_DATA); - if (prefixes & PREFIX_DATA) - index = 2; + /* We should check PREFIX_REPNZ and PREFIX_REPZ + before PREFIX_DATA. */ + used_prefixes |= (prefixes & PREFIX_REPNZ); + if (prefixes & PREFIX_REPNZ) + index = 3; else { - used_prefixes |= (prefixes & PREFIX_REPNZ); - if (prefixes & PREFIX_REPNZ) - index = 3; + used_prefixes |= (prefixes & PREFIX_DATA); + if (prefixes & PREFIX_DATA) + index = 2; } } dp = &prefix_user_table[dp->bytemode2][index]; -- 2.30.2