diff options
author | Nicolas Pitre <nico@fluxnic.net> | 2009-10-27 21:19:42 -0400 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-10-27 19:25:54 -0700 |
commit | 39dd68bca649e9275c602fa212f448ae8497f306 (patch) | |
tree | 2aad3e9e4d6ddf5d515ce3b74cfffc76aace99ed /src | |
parent | 993fe4ab633eff4f04dd63e4751ccc2a6ea2d52e (diff) | |
download | openocd+libswd-39dd68bca649e9275c602fa212f448ae8497f306.tar.gz openocd+libswd-39dd68bca649e9275c602fa212f448ae8497f306.tar.bz2 openocd+libswd-39dd68bca649e9275c602fa212f448ae8497f306.tar.xz openocd+libswd-39dd68bca649e9275c602fa212f448ae8497f306.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/arm_disassembler.c | 1 |
1 files changed, 1 insertions, 0 deletions
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: |