Files
BFM-decomp/docs
Drew T bf056e179f docs(cookbook): §463 — spill slots are 8 bytes; the §41b prologue wall is refuted
From the S76 func_8001FC08 agent (400 ins, 33 -> 0 MATCH). Three laws.

A 4-byte gap in an otherwise 4-packed frame is a SPILL SLOT, not a pad:
reload's alter_reg calls assign_stack_local(mode,size,-1), and align==-1
means BIGGEST_ALIGNMENT=8 with CEIL_ROUND, so every 4-byte spill occupies
eight bytes. Worth 11 ins, and modelling them as spills is what evicts both
from local-alloc so reload picks $t0.

§41b's 'a global load cannot float above the RTL prologue' is NOT a wall — it
is an $a0 anti-dependence, because the param copy addu $s0,$a0,$zero reads
$a0. Get the value out of $a0 AND make the load first and it floats to idx 0.
Either move alone is worthless (statement-first alone measured 33 -> 50);
together 22 -> 4.

Argument POSITION decides a guard value's hard register: passing it as arg 1
gives the pseudo a qty_phys_copy_sugg toward $a1, unreachable by local-alloc's
scan-from-$v0. The siblings that don't pass it stay $v0 — the control.

Also records the bank-time typedef hoist this function needs in src/800.c.
2026-09-03 16:00:33 -06:00
..
2026-09-02 16:45:33 -06:00