This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix value_in_comment in print_insn_thumb32


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
 			{

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]