rizin/test/db/analysis
Anton Kochkov 9ff9a48c4a arch/tms320: extend C55x/C55x+ RzIL coverage (returns, addressing, sub-register and bit ops)
Builds on the shared decode-IR engine to lift a broad set of common C55x and
C55x+ (Ryujin) instruction forms that were previously left without RzIL,
deriving the exact semantics from the TI C55x+ references (SWPU104 / SWPU086).

Control flow and addressing:
  - ret / reti / retcc: return address read from the top of stack, SP popped by
    two words, control transferred to it (retcc guarded by its predicate).
  - 24-bit XAR correctness on C55x+ (XAR0-15, XSP, XSSP, XDP, XCDP) in the
    register table, the IL-VM profile and the pointer-arithmetic width, enabling
    the 24-bit amov address immediate; classic C55x keeps its 23-bit file.
  - long constant-index and 16-bit-absolute addressing modes, memory-to-memory
    copy, shifted memory loads (uns()/signed, immediate shift), and the
    memory-mapped-register moves mov reg,mmap(@reg) / mov mmap(@reg),reg.
  - push/pop of accumulator sub-register halves and dbl(xarN) pointer pairs.

Arithmetic, logical, shift and bit operations:
  - sub-register add/sub on a 16-bit accumulator slice, for the immediate and
    register forms: a .L destination updates [15:0], a .H destination updates
    [39:16] sign-extended through the guard (SWPU104 1.5.1).
  - bitwise and/or/xor with a 16-bit source (half or AR/T) into a full
    accumulator, zero-extending the operands to 40 bits (SWPU104 6.6.1); the
    memory-source bitwise forms into full and half destinations; and the
    shift-ALU forms <op> ACx.<sub> << #S6, ACy.<sub> on the 16-bit slice.
  - memory-source add (including a 16-bit half addend and the reverse-subtract
    sub ACx.<sub>, Smem, ACy.<sub>), the 32-bit dbl(Lmem) add/sub forms
    (ACy = ACx +/- dbl(Lmem) and the reversed ACy = dbl(Lmem) - ACx), and the
    memory-destination immediate RMW add/sub #k, Smem.
  - register bit ops bclr / bset / bnot @#k, ACx[.h/.l] / ARx: clear, set or
    toggle bit k of the register, the bit number taken relative to the
    addressed sub-register (a .h operand targets bit k+16, the guard k+32).
  - bitwise not ACx.<sub>/ARx into an accumulator half or a 16-bit register
    (not ACx.l, ARy), the half-register and short (0x7b #1/#-1) sftl/sfts
    including register-count shifts, and btst @#k, ACx.l/.h, TCy.

This also corrects an op_type-fallback mis-lift: on C55x+ several non-move
instructions (round, sat/satr, the mant/nexp helper) and the bit-field
extract/expand bfxtr/bfxpa were typed as a move and so were lifted as a plain
register copy. round and sat/satr now carry their lops and reach the existing
rounding / saturation handlers (matching C55x); mant/nexp, bfxtr/bfxpa, the
operand-less sat and the register-indexed memory bit ops (bclr/bset/bnot Baddr)
are marked decode-only (no modelled data effect) so the fallback can no longer
guess at them.

Also fixes a FIRSADD/FIRSSUB lifting bug: the Cmem operand was not converted
from AR to XAR before emitting its pointer post-modify, so a post-modified Cmem
(e.g. firssub *ar3-, *ar5-, *ar6-, ...) produced an invalid 16-bit-vs-24-bit
subtract that failed IL validation; Cmem is now widened like Xmem/Ymem.

The multiply/MAC family stays unlifted by design, as do the flag-predicate
retcc forms (whose condition register field is not represented by the decoder)
and the software-interrupt intr (which would need the interrupt-vector base);
the correct-or-NULL contract test asserts a representative deferred form.

The disassembler tests for both variants are extended with the expected IL for
every form that lifts -- previously the optional IL field was omitted on many
lines whose lift already existed, leaving the lifting unchecked -- so the asm
suite now validates RzIL for all lifted C55x / C55x+ instructions, not just a
subset.

Measured on a 5 MB C55x+ firmware image (16k-instruction sample) RzIL coverage
rises from 82% to 99.4% of decoded instructions, the remaining tail being the
multiply/MAC family and the deferred forms above.
2026-06-15 23:31:05 +08:00
..
6502 Updated all tests 2022-11-01 10:58:16 +08:00
8051 Convert zero-output EXPECT=<<EOF to single-line EXPECT= (#4746) 2024-11-28 18:18:00 +08:00
alpha librz/arch: rewrite the RISC-V support to use Capstone (#5482) 2026-02-17 03:35:37 +08:00
amd29k Convert opex to use RzStructuredData (#5613) 2025-12-16 15:21:44 +08:00
arc Fix endianness issues on s390x (#5940) 2026-02-19 23:13:18 +08:00
arm Improve ARM/AArch64 DATA xrefs analysis (#6506) 2026-06-14 21:10:30 +08:00
arm64 Improve ARM/AArch64 DATA xrefs analysis (#6506) 2026-06-14 21:10:30 +08:00
avr Support Siemens/Infineon C16x microcontroller (#6321) 2026-05-12 21:17:37 +08:00
c166 Support Siemens/Infineon C16x microcontroller (#6321) 2026-05-12 21:17:37 +08:00
cbpf refactor: add hashtable-based RzGraph implementation (#6152) 2026-04-08 04:01:40 +08:00
chip8
classes table: Right-align number columns (#4849) 2025-01-19 23:00:37 +08:00
cris Remove RzAnalysisPlugin.set_reg_profile (#2091) 2021-12-11 10:18:31 +01:00
dalvik librz/arch: remove unused ESIL remnants from Dalvik (#6024) 2026-03-12 03:07:07 +08:00
gb Updated all tests 2022-11-01 10:58:16 +08:00
golang bin/elf: do not disassemble allocated string tables (.dynstr) as code (#6436) 2026-05-31 04:01:21 +08:00
h8300 refactor: remove RzAsm struct from the public APIs (#6089) 2026-03-26 01:57:42 +08:00
h8500 bin/coff: promote globals in code sections to FUNC 2026-05-28 17:44:54 +08:00
hexagon librz/arch: update Hexagon to v81 + HMX Extension (#6041) 2026-03-27 13:36:03 +08:00
hppa hppa: use capstone disassembler 2026-02-01 18:23:12 +08:00
i4004 Updated all tests 2022-11-01 10:58:16 +08:00
java librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
loongarch librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
luac Luac 5.0-5.5 support (#6142) 2026-04-05 08:12:55 +08:00
luajit librz/arch: add LuaJIT 2.1 bytecode support (#5961) 2026-05-12 23:37:10 +08:00
m68k Update Capstone and add M68k ColdFire support (#6399) 2026-05-31 16:15:56 +08:00
m680x librz/arch: add RS08 and HCS12X as new M680X CPU types (#5977) 2026-05-05 23:35:15 +08:00
mach0 Fix all db/analysis tests 2021-10-27 09:31:50 +02:00
mcore Remove RzAnalysisPlugin.set_reg_profile (#2091) 2021-12-11 10:18:31 +01:00
mcs96 Convert opex to use RzStructuredData (#5613) 2025-12-16 15:21:44 +08:00
milstd1750 librz/arch: MIL-STD-1750 ISA support (#6042) 2026-06-11 12:53:58 +08:00
mips librz/arch/mips: improve static GP resolution (#6497) 2026-06-11 23:15:53 +08:00
msp430 Move arch config into function (#5902) 2026-02-17 18:19:40 +08:00
noreturn Fix all db/analysis tests 2021-10-27 09:31:50 +02:00
null Remove RzAnalysisPlugin.set_reg_profile (#2091) 2021-12-11 10:18:31 +01:00
path
pic Fix endianness issues on s390x (#5940) 2026-02-19 23:13:18 +08:00
ppc Fix endianness issues on s390x (#5940) 2026-02-19 23:13:18 +08:00
riscv Feature: JOP and COP support (#6257) 2026-05-11 09:56:35 +00:00
rl78 librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
rx librz/bin: refactor feature detection on RzBin (#6188) 2026-04-10 02:25:35 +08:00
sh Convert zero-output EXPECT=<<EOF to single-line EXPECT= (#4746) 2024-11-28 18:18:00 +08:00
snes refactor: remove RzAsm struct from the public APIs (#6089) 2026-03-26 01:57:42 +08:00
sparc Move arch config into function (#5902) 2026-02-17 18:19:40 +08:00
spc700 Updated all tests 2022-11-01 10:58:16 +08:00
sysz test: make consistent sysz regs test output (#6326) 2026-05-08 22:33:00 +08:00
thumb Fix endianness issues on s390x (#5940) 2026-02-19 23:13:18 +08:00
tms320 arch/tms320: TMS320C55x+ analysis & RzIL (PR #6434) + extended lifter coverage 2026-06-15 23:31:05 +08:00
tms320.c55x+_32 arch/tms320: extend C55x/C55x+ RzIL coverage (returns, addressing, sub-register and bit ops) 2026-06-15 23:31:05 +08:00
tms320.c55x_32 arch/tms320: rewrite C55x and C55x+ on a shared decode-IR engine 2026-06-15 23:31:05 +08:00
tms320.c64x_32 arch/tms320: fix =PC alias in c64x register profile 2026-05-28 17:44:54 +08:00
tricore Allow rizin tools to run as standalone binaries (#6011) 2026-03-11 16:24:23 +00:00
v810 v810: RzIL support (#4096) 2024-01-14 10:45:48 +08:00
v850 Omitted reflines when internal grep ~ is used (#6062) 2026-04-04 12:03:06 +00:00
vars librz/arch/dwarf: fix range-size underflow when picking a loclist's representative location (#6474) 2026-06-10 16:14:28 +08:00
vax librz/arch/vax: add new LGPL DEC VAX-11 disassembler and analysis plugin 2026-06-13 18:58:55 +08:00
x86_16 Convert opex to use RzStructuredData (#5613) 2025-12-16 15:21:44 +08:00
x86_32 test: fix some broken tests in pd, af, and x86_32‎ analysis (#6128) 2026-04-15 23:02:14 +08:00
x86_64 librz/bin: handle PLT sections properly (#6499) 2026-06-13 02:20:41 +08:00
xap arch/xap: refactor the code up to rizin standard (#4659) 2024-10-04 01:45:37 +08:00
xcore Convert opex to use RzStructuredData (#5613) 2025-12-16 15:21:44 +08:00
xtensa Fix endianness issues on s390x (#5940) 2026-02-19 23:13:18 +08:00
z80 Updated all tests 2022-11-01 10:58:16 +08:00