From 39dd68bca649e9275c602fa212f448ae8497f306 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 27 Oct 2009 21:19:42 -0400 Subject: [PATCH] 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 Signed-off-by: David Brownell --- src/target/arm_disassembler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c index 5b0046b7d..ee087b121 100644 --- a/src/target/arm_disassembler.c +++ b/src/target/arm_disassembler.c @@ -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: