diff --git a/phase-ends/CURRENT_PHASE.md b/phase-ends/CURRENT_PHASE.md index ec5d511c66..7df81c690a 100644 --- a/phase-ends/CURRENT_PHASE.md +++ b/phase-ends/CURRENT_PHASE.md @@ -46,6 +46,7 @@ Whole-binary byte-gate (`tools/harvest_verify.py`) is the SOLE arbiter (G3/P9). ## Progress log *(append one line per task on completion β€” the crash-recovery trail)* +- **πŸ”œ NEXT SESSION (2026-07-07, whale done) β€” the 2-3 Γ—1-matched giants β†’ Γ—134 (Drew: "finish the giants").** `func_801372B0` (207) + `func_801770E0` (152) + `func_8014E048` (143, T5b S11 crack) are MATCHED but banked Γ—1 in ov_SC01_077, STUBBED in the other 133 overlays β€” blocked from Γ—134 because `dedup_propagate.compiles_standalone` (tools/dedup_propagate.py:246) REJECTS register-asm-pin / anon-struct / local-typedef bodies (Β§A). Est. ~+0.4-0.6% byte-weight (already-matched; no new matching). **WHALE-DERIVED LEVER (a promising LEAD β€” verify, not proven):** the whale propagated Γ—134 WITHOUT dedup_propagate β€” via a **shared header** (`src/shared/func_80144B9C.h`) + a **hand-registered** h_exact dedup group (`.run/t7b/register_whale_dedup.py` β†’ E_func_80144B9C, `source=`the header). This pattern **BYPASSES `compiles_standalone` entirely**. The Γ—1 giants may bank Γ—134 the same way: extract each matched body β†’ `src/shared/.h`, then in ov_SC01_077 AND each of the 133 overlays replace the `INCLUDE_ASM()` line with `#include "../shared/.h"` **AT THE STUB POSITION** (NOT the file top β€” the fns are position-locked in the -O2 main subseg, unlike the whale which had its own o0b subseg), and hand-register the group. Sidesteps the pin/asm gate. (Alternative: teach `compiles_standalone` to compile pin/asm bodies WITH the pins.) A `rollout_whale_o0.py`-style tool (but for a mid-file `#include`, no yaml carve since these are -O2) would script it. **Then the giant endgame is fully banked.** Whale commits **commit:0463 (Γ—1) + commit:0464 (Γ—134)** β€” ready for Drew to push. - **πŸ‹ T7 WHALE Γ—134 ROLLOUT COMPLETE β€” clean fleet 136/136 (2026-07-07):** all 134 overlays now carry func_80144B9C as -O0 compiled C (was Γ—1 in ov_SC01_077) β€” the single biggest byte-weight lever, banked Γ—134 (~+1.6% byte-weight). Mechanism (`tools/rollout_whale_o0.py`): per single-file overlay, LINE-split `.c` at the whale (splat emits in vram order β†’ no item-parse hazard), carve the yaml code subseg into before/`_o0b`(-O0)/`_after`, thin `_o0b.c` #includes the shared `src/shared/func_80144B9C.h` (the whale C moved there β€” DRY, TU-local typedefs, NOT a fragile 200-line DEFINE_ macro). One Makefile `WHALE_O0B_OBJS` wildcard -O0-compiles all `_o0b.o`. Registered dedup group **E_func_80144B9C** (134 members, h_exact 74186b97, source=the header β€” `group_members` keys on binary+vram, so a header-share validates like a macro-share). **CLEAN fleet check-all 136/136 (R22)**; dedup-check 1810β†’**1811/0**; FLEET REAL 225816β†’225949, byte-identical 65.91β†’**65.95%** function-count (the big gain is byte-weighted). Validated on ov_SC01_000 + spot-checks SC02/SC03/SC07 before the full fleet. Distilled: **cookbook Β§38** (struct-assign -O0 idiom + the -O0 reach-134 rollout + the memcpy asm-label) + SETUP inventory. **πŸ‹ WHALE DONE.** Commit: (this). - **πŸ‹ T7 WHALE func_80144B9C CRACKED + banked Γ—1 (-O0), clean fleet 136/136 (2026-07-07):** the 770-ins reach-134 whale β€” the single biggest byte-weight lever (β‰ˆ next ~8 giants combined). **CRACK (cheap Opus, NO Fable5/calls.c β€” both retired):** the close=2 residual was a STRUCT ASSIGN `D_80078E50 = *ent;` (sizeof(ENT)==0x24), NOT an explicit memcpy() β€” gcc-2.7.2 -O0 expands a >MOVE_RATIO struct copy via emit_block_moveβ†’emit_library_call(memcpy): args go through copy_to_mode_reg (pseudos) then `addu $a0,$v1 ; addu $a1,$v0` = the exact 2 missing moves. **BANK INFRA (byte-neutral, reusable for Γ—134):** (1) 2nd per-file -O0 split β€” the whale is a 2nd -O0 region (prologue 21F0A003) in the -O2 "after" segment, carved into its own -O0 object `o0b` (splat.ov_SC01_077.yaml 3-way + Makefile CC1FLAGS=-O0; the file is splat-emitted in vram order β†’ a LINE-based split at the whale preserves all banked C, no item-parsing/DEFINE_ hazard β€” `.run/t7b/split_whale.py`). (2) `memcpy=0x8005C324` in symbols.resident.txt (overlays+resident ONLY β€” main defines memcpy via MEMCPY.o, so a shared-symbol add would multiple-def) + `__asm__("memcpy")` on the engine_core.h block-copy macro (keeps the non-builtin C name to avoid gcc's built-in-memcpy codegen, emits the same 0x8005C324 call; benign "conflicting types for built-in memcpy" warning). splat REJECTS two symbols at one addr (tried func_8005C324+memcpy β†’ error) β†’ the asm-label is the fix. ov_SC01_077 == d19c9580; **CLEAN fleet check-all 136/136 (R22)**, dedup 1810/0. **W9 NEXT: script the Γ—134 -O0 rollout** (per-overlay o0b split via split_whale-style tool + a DEFINE_func_80144B9C() macro w/ TU-local typedefs β€” no engine_types.h collision; 133 single-file overlays, whale stubbed at file 0x1CA44 in each) β†’ ~+1.6% byte-weight. Commit: (this). - **T7 Β§G BATCH CLOSE βœ… (2026-07-07, committed; TRUE clean fleet 136/136) β€” 6/8 reach-134 giants cracked, 4 propagated Γ—134, fleet 65.75β†’65.91%:** MATCHED: `func_801571C4` (permuter, after the p16_permute comment-fix), `func_8014EA4C`/`func_801372B0`/`func_801770E0`/`func_80176D94`/`func_80148094` (Fable5, sequential idiom-banking chain). 2 WALLS (stay INCLUDE_ASM, G4): `func_80178004` (biv-init emit-order, close=7), `func_801412A8` (allocation placement-knot, close=29). **Propagated Γ—134:** 571C4/EA4C/76D94/48094 (134 overlays byte-identical; dedup **1810 groups / 0 failed**; genuinely-clean `make clean`+extract-all-136+check-all = **136/136**). **Γ—1 (Γ—134 follow-up β€” Β§A `dedup_propagate.compiles_standalone` gaps):** `func_801372B0` (asm-label-alias bank; blocked by local SVEC/GLINE typedefs β€” need unique-renamed lift β€” + register-asm pins), `func_801770E0` (anon-struct'd; blocked by register-asm pins). **NEW TOOLS:** `tools/p16_permute.py` comment-fix (a silent bug that had no-op'd the permuter on EVERY commented draft β†’ immediately cracked 571C4) + `tools/permuter_ils.py` (warm-restart iterated-local-search). **KNOWLEDGE (durable):** cookbook **Β§37** + `docs/gcc-2.7.2-map/t7g-giant-harvest.md` (sibling-isomorphism law Β· `/s`-dep-lattice load+store dual Β· allocno ref-boost Β· coalescable-copy insn_count bump Β· RC-6-exemplar downgrade Β· "RTL dumps NOT stripped" Β· asm-label-alias/anon-struct banking). **REMAINING:** the WHALE `func_80144B9C` (close=2, DISCOVERED -O0 β€” needs a 2nd per-file -O0 split + gcc-2.7.2 `calls.c` + Fable5) + the 2 Γ—1 giants' Γ—134 (a pin/asm self-containment shim). Commit: (this).