capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

[ARM] instr. with pc writes are not part of jump group #2233

Closed Rot127 closed 9 months ago

Rot127 commented 10 months ago

An instruction which writes to pc should be part of the jump group.

Similar logic is added for pop instructions which write to pc ( https://github.com/capstone-engine/capstone/commit/4fc80d82f9134e5b4ed0173a7c79a9b221c87626)

As an example, this mov should be of the jump group.

./cstool -d thumb 8746
 0  87 46  mov  pc, r0
    ID: 28 (mov)
    op_count: 2
        operands[0].type: REG = r15
        operands[0].access: WRITE
        operands[1].type: REG = r0
        operands[1].access: READ
    Registers read: r0
    Registers modified: r15
    Groups: IsThumb