aboutsummaryrefslogtreecommitdiff
path: root/opcodes/arm-dis.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2005-11-02 16:53:11 +0000
committerPaul Brook <paul@codesourcery.com>2005-11-02 16:53:11 +0000
commit36b0c57df531ab35cf3a66a098c73ebbacb55a17 (patch)
treeac44e51a2998df336d540cbe10d027f83a0315e9 /opcodes/arm-dis.c
parent18cf8b5b37bea79e24868845c201571abee4d8c5 (diff)
downloadgdb-36b0c57df531ab35cf3a66a098c73ebbacb55a17.zip
gdb-36b0c57df531ab35cf3a66a098c73ebbacb55a17.tar.gz
gdb-36b0c57df531ab35cf3a66a098c73ebbacb55a17.tar.bz2
2005-11-02 Paul Brook <paul@codesourcery.com>
* arm-dis.c (print_insn_thumb32): Word align blx target address.
Diffstat (limited to 'opcodes/arm-dis.c')
-rw-r--r--opcodes/arm-dis.c7
1 files changed, 6 insertions, 1 deletions
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;