* warning.m4 (AM_BINUTILS_WARNINGS): Default to empty string
[deliverable/binutils-gdb.git] / opcodes / arm-dis.c
index 236a1c9e3ad88150ba32adf271a46a630d7bbe0a..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;
 
@@ -2854,13 +2859,13 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
       size = 2;
 
       status = info->read_memory_func (pc, (bfd_byte *)b, 2, info);
+      if (little)
+       given = (b[0]) | (b[1] << 8);
+      else
+       given = (b[1]) | (b[0] << 8);
+
       if (!status)
        {
-         if (little)
-           given = (b[0]) | (b[1] << 8);
-         else
-           given = (b[1]) | (b[0] << 8);
-
          /* These bit patterns signal a four-byte Thumb
             instruction.  */
          if ((given & 0xF800) == 0xF800
This page took 0.02306 seconds and 4 git commands to generate.