From 0c74457f27ded6a67d539c5e5ee7064149ef423d Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:12:14 -0600 Subject: [PATCH] =?UTF-8?q?docs(cookbook):=20=C2=A7471=20=E2=80=94=20a=20l?= =?UTF-8?q?aunder's=20cost=20is=20an=20allocno,=20and=20$t0=20belongs=20to?= =?UTF-8?q?=20reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the S76 func_80032A74 agent (422 ins, 408 -> 12). Refines §153: the launder was necessary but created an allocno outranking the value it was protecting; the cure was pinning the launder itself to $10 — and NOT $8, which evicts reload's $t0 parameter reloads. So '§461: the launder is the defect' has a third resolution beyond remove-it or move-it: pin it, and choose the register with reload's own needs in mind. New general fact: $t0 is unreachable from C because reload owns it — the target's table bases are reload rematerialisations of a reg_equiv_constant there. A residual of the form 'the target uses $t0 and I cannot' is a reload artifact, not an unfound spelling. Also pairs with §463/§469: a frame slot nothing reads is either an 8-byte rounded spill or a §172 combine USE-orphan — both reproducible, neither padding. --- docs/matching-cookbook.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/matching-cookbook.md b/docs/matching-cookbook.md index c6041fa0c..8bb993ae9 100644 --- a/docs/matching-cookbook.md +++ b/docs/matching-cookbook.md @@ -35461,3 +35461,27 @@ allocno class choice) but it drags the `*24` shift chain into `$s1`; plus operan `addu $s0,$s1,$s0`; plus the else-arm materialising `&D_800A46D2` into `$s1`. Law 1c verified: all 25 symbols match the target's relocations, and the only difference is `D_800A46D2`'s **count** (4 vs 6), which is that residual rather than a wrong symbol. + +#### §471 — A LAUNDER'S REAL COST IS AN ALLOCNO, AND `$t0` IS RELOAD'S (`main:func_80032A74`, 408 → 12) + +**Source: the S76 agent.** Three facts, two of which refine entries already here. + +**1. §172's combine USE-orphan buys a never-referenced stack slot.** Promoting an `s16` memory local +to `int` **twice** after a `CODE_LABEL` is the only way to produce the target's unused 8-byte slot at +`0x48`. Pair this with §463/§469: when a frame has a slot nothing reads, it is either a spill (8-byte +rounded) or an orphan of this kind — both are reproducible, neither is padding. + +**2. 🔴 REFINEMENT OF §153: THE LAUNDER'S REAL COST IS AN ALLOCNO THAT OUTRANKS THE VALUE YOU CARE +ABOUT.** The §153 launder was necessary here, but it created an allocno outranking `vol` on priority. +The cure was pinning the launder to **`$10`** — and specifically *not* `$8`, which evicts reload's +`$t0` parameter reloads. So "the launder is the defect" (§461) has a third resolution beyond +*remove it* or *move it*: **pin the launder itself, and pick the register with reload's own needs in +mind.** + +**3. `$t0` IS UNREACHABLE FROM C BECAUSE RELOAD OWNS IT.** The target's `table` / `D_800A4C28` bases +are reload **rematerialisations** of a `reg_equiv_constant` living in `$t0`. No C spelling or pin can +put a value there, because reload claims it for its own reloads. When a residual is "the target uses +`$t0` and I cannot", stop — that is a reload artifact, not a spelling you have not found yet. + +*(Also: merging `vol` and `m` into one variable puts the volume chain in `$a0`. Residual 12 is this +`$t0` rematerialisation plus one `lh`/`lhu` row that is the orphan's only available site.)*