Browse Source

ARM: fix target address when disassembling Thumb BLX

A Thumb BLX instruction is branching to ARM code, and therefore the
first 2 bits of the target address must be cleared.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
tags/v0.3.0-rc0
Nicolas Pitre 14 years ago
committed by David Brownell
parent
commit
39dd68bca6
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/target/arm_disassembler.c

+ 1
- 0
src/target/arm_disassembler.c View File

@@ -1768,6 +1768,7 @@ static int evaluate_b_bl_blx_thumb(uint16_t opcode,
case 1:
instruction->type = ARM_BLX;
mnemonic = "BLX";
target_address &= 0xfffffffc;
break;
/* BL/BLX prefix */
case 2:


Loading…
Cancel
Save