2005-11-02 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Wed, 2 Nov 2005 16:53:11 +0000 (16:53 +0000)
committerPaul Brook <paul@codesourcery.com>
Wed, 2 Nov 2005 16:53:11 +0000 (16:53 +0000)
* arm-dis.c (print_insn_thumb32): Word align blx target address.

opcodes/ChangeLog
opcodes/arm-dis.c

index 5bf79149affec3d2e284c7b5638b23deaa3b8834..7d6757c80a625fc316193bcdb6090c038fd94d4b 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Paul Brook  <paul@codesourcery.com>
+
+       * arm-dis.c (print_insn_thumb32): Word align blx target address.
+
 2005-10-31  Alan Modra  <amodra@bigpond.net.au>
 
        * arm-dis.c (print_insn): Warning fix.
index a19c077c067ae2748c9b3dde8a94905a6d02e00d..fb3cb77bc4a1ee080edb4a28d1375bd067448b08 100644 (file)
@@ -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;