From 84919466a87f5ce10cc1af8ef51d7ab9ea66ff5e Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 22 Aug 2014 16:42:12 +0100 Subject: ARM/opcodes: Fix negative hexadecimal offset disassembly 2014-08-21 Nathan Sidwell Maciej W. Rozycki opcodes/ * arm-dis.c (print_arm_address): Negate the GPR-relative offset returned if the U bit is set. 2014-08-21 Paul Brook gas/testsuite/ * gas/arm/arch7a-mp.d: Adjust according to `print_arm_address' offset fix. * gas/arm/arch7r-mp.d: Likewise. --- opcodes/arm-dis.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'opcodes/arm-dis.c') diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index f43ce0d..8f399fb 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -2583,6 +2583,8 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given) arm_decode_shift (given, func, stream, TRUE); } } + if (NEGATIVE_BIT_SET) + offset = -offset; } return (signed long) offset; -- cgit v1.1