Files
BFM-decomp/tools
Drew T ee4b3a02e8 feat(phase-27 T5): extract_unit carries file-scope #define macros — honest 0x8017BEBC probe + the pin-crash wall dissolved
family_remap.extract_unit dropped the file-scope function-like #define macros a body references
(the gte_* C inline-asm GTE-op macros live ABOVE the function; the backward preamble walk stopped at
the first #define/continuation line). A staged sibling saw every GTE op as an implicit-declaration
CALL. Two consequences in one bug:
- staging failed: 0x8017BEBC's 112 members all CC1-FAIL'd -> a FAKE 0% probe that reads
  "mechanical harvest dead" when the tool was broken (a 4th phantom exhaustion proof, exactly the
  26-A audit class).
- the SIGABRT: with a caller-saved register PIN present, the phantom call pushes cc1's sched1 into
  create_reg_dead_note's abort (sched.c:2725) — the §42e "pin-crash wall". The wave-2 SIGABRT agent
  proved this IS the cause (.run/giants/pin_crash_sigabrt.md): pinned families stage 133/133 clean
  once their macros ride along. A propagation wall recorded as a compiler limit for phases = a
  staging-tool artefact.

- _carry_macros: prepend the function-like #define macros the unit body references (file order),
  not already inside the unit. Safe by construction: feeds only the templating path (remap_hseq),
  never make_macro's engine_core.h lift (no #define embedded in a DEFINE_func_*() macro);
  gather_externs only scans func_/D_ so no bogus extern; regression-verified non-GTE exemplars
  carry 0 macros (a no-op where it should be).

THE HONEST PROBE (R14): staging 0 -> 106/112 (6 skip = IMM tier-2). Bounded 8-member gate sample =
0 banked / 8, ALL genuine DIFF (T4 classifier: compiled, wrong bytes — NOT plumbing). 0x8017BEBC is
BYTE-PROVEN NOT TEMPLATABLE: the roadmap's "largest cheap win left" (B2) is REFUTED. The h_seq match
is necessary, not sufficient. This 0% MEANS something because the tool is fixed first.

Carried to T8: harvest the now-unblocked pin families (verify the 133/133 claim + bank).
2026-07-15 19:20:56 -06:00
..