Closed
Description
>>> import capstone
>>> capstone.version_bind()
(5, 0, 1280)
>>> cs = capstone.Cs(capstone.CS_ARCH_ARM64, capstone.CS_MODE_ARM)
>>> cs.detail = True
>>> inst_bytes = b'\x07\x00\x00\x14'
>>> inst = cs.disasm(inst_bytes, 0xfffffff044444444)
>>> inst = next(inst)
>>> inst
<CsInsn 0xfffffff044444444 [07000014]: b #0xfffffff044444460>
>>> operand = inst.operands[0]
>>> hex(operand.imm)
'-0xfbbbbbba0'
operand.imm currently outputs as signed version of the branch label which is incorrect.
Should it be:
- the unsigned label
- the signed imm26 encoded in the instruction
- multiply by 4
- without multiply by 4
Metadata
Metadata
Assignees
Labels
No labels