phase11: merge 45 + cookbook 154 — 581 bodies / 590 regions

Worker A's 0x800F452C (112 B, maspsx=epilogue, second attempt) -- a sibling of its own
0x800F4098, matched with the mid-function-branch-target lever applied first try.

Worker A asked FIVE TIMES for the lui-page rule to be prominent, having made the mistake five
times. It is now cookbook 154 and the FIRST of the five things the workflow doc tells a new
worker, with all five instances tabulated. The fifth instance added the missing half: the
immediate is a SIGNED DISPLACEMENT, and the signature of the error is 'a residual of ONE
differing byte whose only difference is a lui or addiu immediate'.

Also confirmed from worker A's side: the shape A/B correction works -- 0x800F452C is a shape-B
row and closed with the single token, so the tail filter is obsolete and A has dropped it.
This commit is contained in:
Christopher Williams
2026-09-24 10:56:40 -04:00
parent 57c1cd22f2
commit bc05792bcb
3 changed files with 48 additions and 0 deletions
+1
View File
@@ -484,6 +484,7 @@
0x800F4098 0x800F4100 src/func_800F4098.c maspsx=epilogue
0x800F42AC 0x800F430C src/func_800F42AC.c maspsx=epilogue
0x800F44D0 0x800F452C src/func_800F44D0.c maspsx=epilogue
0x800F452C 0x800F459C src/func_800F452C.c maspsx=epilogue
0x800F5200 0x800F521C src/func_800F5200.c
0x800F5AF8 0x800F5B40 src/func_800F5AF8.c
0x800F5B40 0x800F5B70 src/func_800F5B40.c
1 # Code-region registry: one C region per matched function.
484 0x800F4098
485 0x800F42AC
486 0x800F44D0
487 0x800F452C
488 0x800F5200
489 0x800F5AF8
490 0x800F5B40
+27
View File
@@ -2525,3 +2525,30 @@ by a worker who has not seen it:
Worker D's `0x800FAF84` writes through `sp+16` with the saved `s0` at `sp+24`, so the local is
**8 bytes** while the callee writes past it. **That is a real property of the original.**
### 154. *** READ THIS FIRST: derive every absolute address from the (page, signed immediate) PAIR ***
**Worker A asked for this line five times, having made the mistake five times. It is the single most
repeated error in this project, so it goes first.**
lui a0,0x8011
addiu a0,a0,-6504 <- the address is 0x80110000 - 6504 = 0x8010E698
<- NOT 0x8011E698, and NOT 0x8010E6A8
**The `lui` immediate is the PAGE. The second instruction's immediate is a SIGNED DISPLACEMENT from
that page.** Reading the printed value as "the low half of the address" is wrong, and reading the
magnitude without its sign is wrong in the same way.
**THE SIGNATURE IS DIAGNOSTIC:** *a residual of ONE differing byte whose only difference is a `lui`
or `addiu` immediate.* If you see that, you have made this error — do not go looking for a source
shape. Worker A's five instances:
| row | error | cause |
|---|---|---|
| gp-relative | `sw zero,2132(gp)` read as the wrong global | offset guessed instead of derived from `_gp = 0x80121938` |
| `0x800F44D0` | `lui v0,0x8012; lw v0,-22316(v0)` read as 0x8012A8D4 | the page is not part of the address; correct is **0x8011A8D4** |
| `0x800F42AC` | read as 0x8011E644 | correct is **0x8010E644** |
| `0x800F4098` | read as 0x8011E5F4 | correct is **0x8010E5F4** |
| `0x800F452C` | read as 0x8010E6A8 | **the sign**: correct is **0x8010E698** |
**Derive it arithmetically, every time: `page * 0x10000 + sign_extend(immediate)`.**
+20
View File
@@ -436,3 +436,23 @@ so the ledger is session-scoped by design — it coordinates live workers, not h
assumption the work assignment rests on.** Adjacency optimised *which* row to take without anyone
revisiting *who owns it*. When you adopt a worker-discovered heuristic, re-check what it assumes
about your own process.
## The five things to tell a new worker FIRST (Phase 11)
Ordered by how much time each has cost workers in practice:
1. **Derive every absolute address from the `(page, signed immediate)` PAIR** — `lui a0,0x8011` /
`addiu a0,a0,-6504` is `0x80110000 - 6504 = 0x8010E698`, not `0x8011E698` and not `0x8010E6A8`.
**The signature of getting this wrong is a residual of ONE differing byte whose only difference is
a `lui` or `addiu` immediate.** This was the most repeated error in the phase — five instances,
all one worker.
2. **A match is `differing_bytes=0` AND `result=MATCH`,** and the whole-binary gate must stay green.
Functional equivalence is not a match.
3. **Cost is tie-break density, not size.** 548 B matched first attempt; 176 B took nine and never
closed. **Prefer a repetitive body over a small one**, and prefer small among equal redundancy
because the milestone counts BODIES.
4. **When the structure is confirmed and only register numbers differ, CLASSIFY — do not grind.**
That is the allocator class, and it is where most failures live.
5. **Check the row is free with a CONTAINMENT test** (a region's end address is exclusive), **append
`wip` before starting, and append `released` only for a row you yourself took.**