From: Nicolas Pitre Date: Wed, 28 Oct 2009 01:19:42 +0000 (-0400) Subject: ARM: fix target address when disassembling Thumb BLX X-Git-Tag: v0.3.0-rc0~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39dd68bca649e9275c602fa212f448ae8497f306;p=openocd 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 --- diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c index 5b0046b7..ee087b12 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: