mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
1e314e7208
Byte-proven on ov_SC07_006/func_801890FC (387 ins). For two stores at equal priority, sched1's LUID tie picks the LAST statement's store first; regalloc then gives the other load $v0, where it sits behind its own $v0 predecessors, and sched2 pins that chain last. Each equal-priority pair therefore appears reversed: source FE;E-=0x40;A-=0xEE;88;8A;8C emits as E,88,A,8C,8A. This is why "statement order is inert" is such a common wrong conclusion here - the mapping is not identity, so trying orders at random explores the wrong space. Compute the intended emission order, then invert each equal-priority pair. Companion (§193-E): the prior draft left no different-address store between `sh 0xA` and its re-read, so cse forwarded it as `andi 0xffff`. A store to a different address between the two re-seeds cse - §416's "re-read the store" seen from the failure side.