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 <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/4382
Reviewed-by: Philipp Guehring <pg@futureware.at>
Tested-by: jenkins
Reviewed-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
This commit is contained in:
Paul Fertser 2018-01-28 15:48:46 +03:00
parent 7ac798016f
commit a957a1c843
1 changed files with 1 additions and 0 deletions

View File

@ -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";