mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-29 23:24:32 -04:00
a10613fa4a
Byte-proven on md_SC07_003/func_801A293C (313 ins, 6 -> 0 in 23 compiles). $t0 there is reload's scratch (regalloc.md L80: first wholly-unused call-clobbered reg), not an allocation: a launder output goes to $v0 via local-alloc, and any $8 pin evicts every mfhi/reload to $t1 (measured 3x). The reach is §385's single-instruction non-volatile asm with the bare symbol as an INPUT. Also: spelling an addPrim RMW as a libgpu P_TAG 24-bit addr bitfield makes store_fixed_bit_field mask the value first, hoisting 0xFFFFFF before 0xFF000000 and closing both the lui/ori and lw-swap clusters at once (6 -> 3); and an in-place `and $s0` needs `s0 = s0 & 0xFFFFFF` written out, not the compound form. The law: before spending iterations on a register you cannot get, ask whether it belongs to regalloc at all - reload runs after every dial C gives you.