capstone v4.0.2 installed from pip (Mac OSX 12.6 and Ubuntu 20.04)
It seems like the ARM Thumb BL immediate values are being incorrectly decoded.
Manually decoding the instruction b"\xff\xf7\xad\xff" ought to yield bl 0xffffff5a, however, capstone gives the following:
>>> from capstone import *
>>> from capstone.arm_const import *
>>> cs = Cs(CS_ARCH_ARM, CS_MODE_THUMB)
>>> insn = next(cs.disasm(b"\xff\xf7\xad\xff", 4))
>>> insn
<CsInsn 0x4 [fff7adff]: bl #0xffffff62>
I have tried with some other bl instructions and the immediate values are also off by 8.
capstone v4.0.2 installed from pip (Mac OSX 12.6 and Ubuntu 20.04)
It seems like the ARM Thumb
BLimmediate values are being incorrectly decoded.Manually decoding the instruction
b"\xff\xf7\xad\xff"ought to yieldbl 0xffffff5a, however, capstone gives the following:I have tried with some other
blinstructions and the immediate values are also off by 8.