From fe50e98c9a22a89ca2e032b17aa7162452c3ad3b Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Tue, 2 May 2017 10:28:09 +0100 Subject: [PATCH] Fix value in comment of disassembled ARM type A opcodes. * arm-dis.c (print_insn_thumb32): Fix value_in_comment. --- opcodes/ChangeLog | 4 ++++ opcodes/arm-dis.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index b9d67d2745f..ad3a01afe82 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2017-05-02 Bernd Edlinger + + * arm-dis.c (print_insn_thumb32): Fix value_in_comment. + 2017-04-25 Claudiu Zissulescu * arc-dis.c (print_insn_arc): Smartly print enter/leave mnemonics. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index a3e53db01bc..a0a03ee1f87 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -5733,7 +5733,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) if (off || !U) { func (stream, ", #%c%u", U ? '+' : '-', off * 4); - value_in_comment = (off && U) ? 1 : -1; + value_in_comment = off * 4 * (U ? 1 : -1); } func (stream, "]"); if (W) @@ -5745,7 +5745,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) if (W) { func (stream, "#%c%u", U ? '+' : '-', off * 4); - value_in_comment = (off && U) ? 1 : -1; + value_in_comment = off * 4 * (U ? 1 : -1); } else { -- 2.39.2