This is an automated email from Gerrit.

Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4382

-- gerrit

commit aa8d8f3f6b230217322e7078a996881de66f9821
Author: Paul Fertser <[email protected]>
Date:   Sun Jan 28 15:48:46 2018 +0300

    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 <[email protected]>

diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
index ef69a20..8e783d3 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";

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to