mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
f574f3c80e
--o0 has existed since P29 and NOTHING ever passed it: api_draft.match_one(), the oracle every wave agent iterates against, builds a fixed argv without it. Every agent handed an -O0 target was shown an -O2 compile of its own C and a mismatch on every instruction — feedback that cannot converge, for a reason invisible in the diff, and it hit even the 51 functions already sitting in -O0 objects. match_one now decides from the target (R33), with two oracles because neither alone is sufficient (R34): the -O0 frame-pointer prologue in the target's own bytes, OR the subseg being an object the Makefile compiles -O0. boot/start.s is built -O0 with no ordinary prologue; an -O0 function stranded in an -O2 subseg has the prologue but cannot bank — and match_one now says so instead of letting an agent chase it. The prologue scan is anchored at glabel, not the top of the file: two md_MAIN_011 .s files open with a migrated jump table / .asciz blob and a naive scan read table words as the prologue. tools/test_o0_detect.py: 14,400 .s scanned, 167/167 signature files covered, 0 false positives outside -O0 objects, both rodata-first files detected. Census correction in the design doc: the handoff's refutation of md_MAIN_003/011 is itself wrong (16 and 21 -O0 functions, byte-verified), and the 311 '$fp mentions' figure over-counts because $fp is $s8, allocatable at -O2. True population: 167 files, of which 116 / 14,148 ins are -O0 functions the build compiles -O2 — double the atlas estimate, with x2/x3/x4 sibling replication.