Files
BFM-decomp/cookbook/C0280.md
T

5.0 KiB
Raw Blame History

§259 — THE DISCARD LEDGER FOR THE aa–bg HARVEST (P31 S58b): WHAT WAS MINED AND REJECTED, AND WHY

Roughly 1,040 of the 1,101 candidates did not become sections. Recording the big rejected clusters so nobody re-mines them. If a future harvest surfaces one of these again, it is confirmation, not news — add a card reference to the cited section rather than a new one.

# cluster ≈cards why not a section
1 "Nothing the cookbook did not already cover" — self-reported no-gap ~700 The flywheel working as designed. Almost all resolve to §193-A (twin-first), §194-E (neighbour-in-own-TU), §195-A (signature rows), §48-C2/§160a (block copies), §167-25/§167-39 (divide reads), §88b (literal position), §3-T4 (branch polarity).
2 "The banked twin gave shape, all literals came from my own .s" ~120 This is law 2, already stated. It recurs on every seeded-crack card and needs no new entry. The exceptions (parameter-slot shifts, register roles, ±one callee) are folded into the §214 addendum.
3 Per-card symbol audits ("all N symbols verified against the target's own relocation lines") ~400 Law 1c compliance reports, not idioms. Valuable as evidence that the discipline holds; zero transferable content.
4 Post-hoc "if the gate still rejects, the fault is outside this body" ~60 Honest, but a null result about the harness, not a codegen law. The actionable half — the nine decl-layer classes — is §236.
5 "The Ghidra seed / leftover shard was a different function; discarded wholesale" ~55 Now §238; individual instances add nothing.
6 Access-width typing (lh⇒s16, lhu⇒u16, sb⇒u8, lw+sh⇒s32 source) ~90 §227 and §183 law 2 already own this, including the mixed-signedness-per-use-site case. The genuinely new half was the constant side, which is §234.
7 "Declared the fresh symbol by access width because no tu row existed" ~70 Standard practice per §183/§195-A. The one real law hiding in here — array-vs-scalar decides lui/addiu vs lw — is §250.
8 House-style adoption ("copied the extern block verbatim from TU line N") ~80 §194-E and law 2. The failure modes are §236.
9 Statement-order observations with no stated mechanism ("moving X before Y fixed it") ~70 Kept only where the mechanism generalises (§213 addendum, §223 addendum, §245). Bare "reordering fixed it" notes are unindexable — a future drafter cannot look them up.
10 Branch-polarity flips reported as one-line fixes ~65 §3-T4/§16201/§136d-2 already cover the read. Only the non-obvious polarities were kept (§247).
11 "match_one compiles standalone, so externs/typedefs must ride along in the snippet" ~40 A harness fact, already in §2363/§12. Recorded once in §236-4 for the typedef half.
12 Frame-size fixes by pad, reported without arithmetic ~35 §162i1/§2429/§226 own the lever; only the seven distinct pad forms and the slot-order law were new (§226 addendum).
13 Delay-slot store readings ("the sh in the jal slot means store-before-call") ~30 §223's own law, now heavily cross-confirmed — folded into the §223 addendum rather than re-stated.
14 GTE / RotTransSV / matrix-macro cards ~25 Almost all resolve to §179-D/§195-J plus the TU's own macro text; the one transferable finding (a flat s32 l[16] scratch buffer beats a named struct, 195→107 ins on func_801853D0) is a §176-D2 companion and is cited there in passing, not promoted.
15 "Similarity 0.5–0.7 twin contributed nothing" ~50 Expected behaviour of the metric; §214 already says so.
16 Single-function offset/literal corrections ("the store is +0x12 not +0x102") ~45 Pure per-card reading errors with no rule behind them.
17 Cast-at-call-site applications ~55 §17a-1. Only the boundary (what it cannot fix) and the four escapes were new — §237.
18 "register __asm__ pin fixed a REGALLOC-PERM" with no stated selection rule ~40 §137/§17/§215 own pins. Only the selection refinements are new (§215 addendum), plus the dead ends in §257.

TWO CLUSTERS DELIBERATELY LEFT AS OPEN PROBLEMS RATHER THAN LAWS (each has ≥2 cards, no working lever, and would be a false law if written up):

  • Forcing own_thread_p on a conditional branch whose successor is a call-bearing join when the arg move is the only candidate insn. func_80182C78 (ov_SC02_027, 20 + 8 oracle calls across two sessions, ~10 distinct spellings). §165-24's ≥2-copy law targets unconditional js and does not transfer to a beqz. Untried lever recorded on the card: make the join unreachable-by-fallthrough with an explicit label+goto from the outer if.
  • Suppressing a second address-giv for a constant +2 offset off an unconditional walked base (§246, func_801AB5D4). Nine drafts, all near-40.

Both are permuter jobs, not source-lever jobs. Do not spend a wave's budget re-deriving them.