angr.analyses.decompiler.ccall_rewriters.arm_ccalls

class angr.analyses.decompiler.ccall_rewriters.arm_ccalls.ARMCCallRewriter

Bases: CCallRewriterBase

ARM condition codes encode flag checks on N, Z, C, V flags. The cond_n_op operand packs condition (upper 4 bits) and cc_op (lower 4 bits). Conditions come in pairs where the odd member inverts the even one (inv = cond & 1).

Flag semantics per operation:

SUB (CMP): N = sign(dep1-dep2), Z = (dep1==dep2), C = (dep1 >=u dep2), V = signed overflow ADD (CMN): N = sign(dep1+dep2), Z = (dep1+dep2==0), C = unsigned carry, V = signed overflow LOGIC: N = sign(dep1), Z = (dep1==0), C = dep2 (shifter carry), V = dep3 (old V) MUL: N = sign(dep1), Z = (dep1==0), C/V from dep3 SBB: like SUB but with borrow: dep1 - dep2 - (dep3^1)

Also handles individual flag helpers (armg_calculate_flag_c/n/z/v) and previously-renamed _ccall expressions (common when constant propagation resolves operands after the initial rename pass).