From: Paul Fertser Date: Sun, 28 Jan 2018 12:48:46 +0000 (+0300) Subject: target: arm: disassembler: fix Thumb2 BLX decoding address X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a957a1c8433f45452902de3060364122602e6e1c;p=openocd target: arm: disassembler: fix Thumb2 BLX decoding address Since BLX in Thumb2 always switches mode to ARM, the PC needs to be 4-bytes aligned. Change-Id: I4f4c194fe21093cecfd9872e1d30588f4adc7257 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/4382 Reviewed-by: Philipp Guehring Tested-by: jenkins Reviewed-by: Paul Sokolovsky --- diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c index ef69a203..8e783d34 100644 --- a/src/target/arm_disassembler.c +++ b/src/target/arm_disassembler.c @@ -2978,6 +2978,7 @@ static int t2ev_b_bl(uint32_t opcode, uint32_t address, case 0x4: inst = "BLX"; instruction->type = ARM_BLX; + address &= 0xfffffffc; break; case 0x5: inst = "BL";