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>
This commit is contained in:
Nicolas Pitre 2009-10-27 21:19:42 -04:00 committed by David Brownell
parent 993fe4ab63
commit 39dd68bca6
1 changed files with 1 additions and 0 deletions

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: