From c6bc651dbce3ff12bb081789bba385369c83049c Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Fri, 25 Sep 2026 00:23:15 -0400 Subject: [PATCH] phase12: record second-batch checkpoint 2 --- docs/MATCHING_COOKBOOK.md | 17 +++++++++++++ phase-ends/CURRENT_PHASE.md | 17 ++++++------- phase-ends/logs/Phase12.md | 48 +++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git a/docs/MATCHING_COOKBOOK.md b/docs/MATCHING_COOKBOOK.md index 5f93b02..667449e 100644 --- a/docs/MATCHING_COOKBOOK.md +++ b/docs/MATCHING_COOKBOOK.md @@ -3376,3 +3376,20 @@ residual small and local. This is a companion to findings 43/45/49: branch polarity, named liveness, and register allocation are still required, but they are the second line of attack after a structural omission is found. + +### 193. A loaded value can need a separate consumer register (solo, Phase 12) + +The second checkpoint adds two clean examples. `0x801029A0` keeps a global's loaded value in +`a1` because it is the second argument to a later call; direct address-named stores reproduce the +repeated absolute `lui` forms. `0x8006BA3C` is more specific: the destination is loaded through +`a0`, tested there, and then copied to `a3` in the first branch's delay slot. Binding the loaded +value to `a0` and the consumer to `a3` produces the target's `move a3,a0` without adding a +separate source-level statement. + +> **When a target has a load, a null branch, and a later base-register use, model the loaded value +> and its consumer as separate live ranges. A direct assignment to the consumer often folds away +> the required delay-slot move.** + +The same principle explains the earlier `0x8002D17C` `$5` queue binding and is distinct from +finding 192's structural-first rule: first get the control/dataflow shape right, then preserve the +register handoff that carries a value across that shape. diff --git a/phase-ends/CURRENT_PHASE.md b/phase-ends/CURRENT_PHASE.md index 92dbd11..1d51c44 100644 --- a/phase-ends/CURRENT_PHASE.md +++ b/phase-ends/CURRENT_PHASE.md @@ -6,16 +6,17 @@ ## STATE — SOLO CONTINUATION, 2026-09-24 (current) -**699 bodies / 708 regions**, from 685 / 694 at the last session stop — **+14 bodies / +14 regions**. -The Phase 12 milestone remains 750 bodies, so **+51 remains**. The promoted whole-binary gate is green: -`c_regions=708`, `differing_bytes=0`, SHA-1 +**703 bodies / 712 regions**, from 685 / 694 at the last session stop — **+18 bodies / +18 regions**. +The Phase 12 milestone remains 750 bodies, so **+47 remains**. The promoted whole-binary gate is green: +`c_regions=712`, `differing_bytes=0`, SHA-1 `e173426c157384ebf1b6caf8c6fea18a85a14af9`; 344 synthetic tests pass and extents report -`regions=708 disagreements=0 result=AGREE`. +`regions=712 disagreements=0 result=AGREE`. -The requested second batch of 20 is underway. Four additional bodies are now matched: -`0x800BC9C4`, `0x800BC8C4`, `0x8006BB0C`, and `0x8002D17C`. Worklist regeneration is now 974 -rows; `excluded_already_registered=706` continues the already-characterised two-row registry lag and -is not a correctness issue because the 708-region gate proves the registry simultaneously. +The requested second batch of 20 is underway. Eight additional bodies are now matched: +`0x800BC9C4`, `0x800BC8C4`, `0x8006BB0C`, `0x8002D17C`, `0x801029A0`, `0x80055958`, +`0x80023A4C`, and `0x8006BA3C`. Worklist regeneration is now 970 rows; +`excluded_already_registered=710` continues the already-characterised two-row registry lag and +is not a correctness issue because the 712-region gate proves the registry simultaneously. ## STATE — SESSION STOP, 2026-09-24 23:35 (historical; superseded by the state above, kept for provenance) **685 bodies / 694 regions**, from 602 / 611 at the Phase 11 close — **+83 bodies**. **Milestone 750 was NOT diff --git a/phase-ends/logs/Phase12.md b/phase-ends/logs/Phase12.md index 4fe941c..d2edf6c 100644 --- a/phase-ends/logs/Phase12.md +++ b/phase-ends/logs/Phase12.md @@ -2094,6 +2094,43 @@ confirmed. **Batch checkpoint: 4 additional bodies / 4 regions matched; current count 699 bodies / 708 regions.** +### Batch task 5 — `0x801029A0` (96 B) MATCH + +* Exact extent: `0x801029A0..0x80102A00`, 96 bytes, grade `exact`. The first range probe used + the wrong hand-derived end and was rejected; the extent table was re-read before promotion. +* Direct absolute-global stores and the two-argument call `func_801092C0(0, D_801461D8)` + reproduce the repeated `lui at` forms and the preserved a1 call argument. +* Tracked source md5: `611d31fd7dca8960415263ac6fa8674b`; fresh range and candidate gate were + zero-difference. Promoted gate: 709 regions; `make check` passed. + +### Batch task 6 — `0x80055958` (108 B) MATCH + +* Exact extent: `0x80055958..0x800559C4`, 108 bytes, grade `exact`. A V4 argument assignment + supplies the batch load/store block; naming `callee = p+0xF4` before the assignment preserves + the target's otherwise non-obvious evaluation order. +* Tracked source md5: `8a0d2361ca6d1ee122b51a340d571e38`; fresh range and candidate gate were + zero-difference. Promoted gate: 710 regions; `make check` passed. + +### Batch task 7 — `0x80023A4C` (100 B) MATCH + +* Exact extent: `0x80023A4C..0x80023AB0`, 100 bytes, grade `exact`. Two duplicate-argument calls + fill a two-word local block; the final callee receives `results[0] + results[1]`, not the + address of the local block. An explicit integer return supplies the zero epilogue. +* Tracked source md5: `3fd61dd53946bb23a3016fa8bb5221f4`; fresh range and candidate gate were + zero-difference. Promoted gate: 711 regions; `make check` passed. + +### Batch task 8 — `0x8006BA3C` (208 B) MATCH + +* Exact extent: `0x8006BA3C..0x8006BB0C`, 208 bytes, grade `exact`. The first range probe again + used a hand-derived end; the exact extent was read from the table before promotion. +* The decisive form is a loaded destination bound to a0 and a consumer destination bound to a3, + producing the target's `move a3,a0` delay-slot copy. The secondary copy occurs when any of + three fields is nonzero; all-zero selects 6. +* Tracked source md5: `4285a9e00a96a0f7f7f9f54ac2cb3678`; fresh range and candidate gate were + zero-difference. Promoted gate: 712 regions; `make check` passed. + +**Batch checkpoint: 8 additional bodies / 8 regions matched; current count 703 bodies / 712 regions.** + ### Bounded attempts in the second batch — stopped without registration * `0x800321F8`: explicit branch/goto and register-binding forms reached 80/88/92-byte variants but @@ -2116,3 +2153,14 @@ confirmed. `a1[0]`/`sltiu` tail was not reproduced by tested liveness forms. * `0x800801B4`, `0x8002D17C` source staging variants not promoted are ignored; only the four tracked sources above are registered. +* `0x800801B4`: local page-base and symbol-base forms still differ in address materialization. +* `0x8007C664`: exact 124-byte table scan remains one `addu` operand-field byte different. +* `0x8005085C`: exact 112-byte sibling copy remains one `addu` operand-field byte different after + offset/base binding variants. +* `0x80058058`: explicit field stores produced a different strength-reduced pointer schedule and + 148 bytes; no source was promoted. +* `0x8005A6D4`: exact-length call sequence retained prologue/save-order differences after bound + and unbound local forms. +* `0x8006BA3C` intermediate candidates were superseded by the final exact source above. +* `0x800FEE3C` remains a bounded multi-exit dbr duplication row from the prior phase; no source + was promoted in this batch.