diff --git a/docs/MATCHING_COOKBOOK.md b/docs/MATCHING_COOKBOOK.md index 42038f6..8c12844 100644 --- a/docs/MATCHING_COOKBOOK.md +++ b/docs/MATCHING_COOKBOOK.md @@ -2306,3 +2306,34 @@ the fill is not something the assembler will do for you, so the harness has to. worklist row's tail for `jr $31` followed by a positive `addiu sp,sp,N`). They are mostly **small** — 76, 76, 80, 92, 92, 96, 104 B — so this is a large class of cheap rows that were blocked on a harness gap rather than on source shape. **770 other rows have the unfilled shape and need nothing.** + +### 141. A read-before-write heuristic does not understand COP2 — worker D's scanner false positive (worker D) + +Worker D's own `reads_unsaved_saved` scan flagged `0x80103434` as reading a callee-saved register it +never establishes. **It read the row and the verdict is: NOT a fragment** — no frame, no +`addiu sp,sp,-N`, no callee-saved register used anywhere, one `jr ra`, `v0 = a1`. + +**The cause is in the detector, not the row:** it treats `op == 0x12` (COP2) by falling through to +"uses = rs", which for `ctc2`/`mtc2`/`mfc2` **is not a value use of that GPR** in the sense the check +assumes. So **every COP2 row in that flag list is suspect.** + +**Worker D's fifth self-correction, and the same lesson as finding 119:** *a shape heuristic needs its +exclusions stated, and only the worker reading the row can find them.* **Three independent instances +now** — the coordinator's `--fragments` list (worker B's read side, worker D's write side), and this +one (COP2). **Every heuristic in this project that fires on a shape has needed a worker to read a +flagged row and say "this is legal, and here is why."** + +### 142. `0x800FEE3C`'s `0x82082083` is now SOLVED — worker C closed worker D's open question + +Worker D recorded `0x800FEE3C` as a bounded negative with a named open question: it could not +reproduce `0x82082083` as a constant division, and noted *"the `addu`/`subu` pair indicates the +NEGATIVE-MAGIC form, so solve D from the correction structure rather than from the shift alone."* + +**Worker C solved it (finding 127): the divisor 63 is of the form `2^k − 1`, which is why cc1 uses +that magic with an ADD-BACK (`mfhi; addu; sra 5`) instead of a plain shift.** An add-back magic is the +tell for a **`2^k − 1` divisor**, not for a large one. + +**So the row is no longer an open question — it is a row with a known divisor.** This is the third +time in the phase that one worker's finding closed another worker's negative, and it is the strongest +argument for the practice of **recording a named open question rather than a vague failure**: D's +write-up is what let C recognise the answer when it arrived from an unrelated row.