This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fix value_in_comment in print_insn_thumb32
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Sun, 30 Apr 2017 16:03:35 +0000
- Subject: [PATCH] Fix value_in_comment in print_insn_thumb32
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=hotmail.de;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi,
this was changed by commit db7b55faa1a11e632ddf57505c9bb64bc783471a
but in the wrong way, and this patch corrects it.
Originally value_in_comment was "off * 4 * U ? 1 : -1" and IMHO
the intention was to compute "off * 4 * (U ? 1 : -1)".
opcodes/
2017-04-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* arm-dis.c (print_insn_thumb32): Fix value_in_comment.
could someone commit this for me?
Thanks
Bernd.
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index a3e53db..a0a03ee 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
{