From: Paul Brook Date: Wed, 2 Nov 2005 16:53:11 +0000 (+0000) Subject: 2005-11-02 Paul Brook X-Git-Tag: gdb-csl-20060226-branchpoint~868 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36b0c57df531ab35cf3a66a098c73ebbacb55a17;p=external%2Fbinutils.git 2005-11-02 Paul Brook * arm-dis.c (print_insn_thumb32): Word align blx target address. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 5bf7914..7d6757c 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2005-11-02 Paul Brook + + * arm-dis.c (print_insn_thumb32): Word align blx target address. + 2005-10-31 Alan Modra * arm-dis.c (print_insn): Warning fix. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index a19c077..fb3cb77 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -2607,8 +2607,13 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) offset |= (given & 0x03ff0000u) >> 4; offset |= (given & 0x000007ffu) << 1; offset -= (1 << 24); + offset += pc + 4; - info->print_address_func (pc + 4 + offset, info); + /* BLX target addresses are always word aligned. */ + if ((given & 0x00001000u) == 0) + offset &= ~2u; + + info->print_address_func (offset, info); } break;