Files
adsp219x-re/r2plugin/asm_adsp219x.c
Dr. Christian Giessen 26f01a5bdb Add analysis support: op->type for all instruction types
Every decode path now sets op->type for r2 analysis:
- R_ANAL_OP_TYPE_NOP/TRAP: NOP, IDLE
- R_ANAL_OP_TYPE_MUL: MAC operations (Type 1, 8, 9)
- R_ANAL_OP_TYPE_ADD: ALU operations (Type 1, 8, 9), MODIFY
- R_ANAL_OP_TYPE_MOV: register loads (Type 6, 7, 17, 18, 25, 33)
- R_ANAL_OP_TYPE_LOAD/STORE: memory access (Type 3, 4, 12, 29, 32)
- R_ANAL_OP_TYPE_JMP/CJMP/CALL: jumps and calls (Type 10, 10a, 19, 36)
- R_ANAL_OP_TYPE_RET: RTS/RTI (Type 20)
- R_ANAL_OP_TYPE_REP: DO UNTIL loops (Type 11)
- R_ANAL_OP_TYPE_SHR: shift operations (Type 14, 15, 16)
- R_ANAL_OP_TYPE_DIV: DIVQ/DIVS (Type 23, 24)
- R_ANAL_OP_TYPE_PUSH: Push/Pop/Cache (Type 26)
- R_ANAL_OP_TYPE_IO: IO/System register (Type 34, 35)
- R_ANAL_OP_TYPE_SWI: SETINT/CLRINT (Type 37)

op->jump set for all branch types.
op->fail set for conditional jumps (next instruction).

Enables: af (function analysis), pdf (function disassembly),
agf (control flow graph), VV (visual graph mode).
Tested: FIR and IIR functions recognized correctly.
2026-04-27 09:07:31 +00:00

31 KiB