mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-03 08:07:25 -04:00
66bf1ebe62
§464, from func_8005DE78 (141 ins -> MATCH): a volatile QI/HI load stops combine folding the u8->s32 promotion into the lbu; ||-vs-&& selects do_jump's drop-through arm; a VOLATILE STORE can never be stolen into a delay slot (resource_conflicts_p returns 1 on any volatil resource) which is how to force a target nop after a j; and a "memory" clobber vs a volatile read are NOT interchangeable CSE-breakers — both reload, but only the clobber leaves the addu operand order alone. §465, from func_8005F830 (152/153 byte-exact): the target hops the head insn of the branch's own target block into the delay slot. Ten controlled probes show cc1's fill_slots_from_thread refuses a thread insn writing the register the branch TESTS, and a negative control shows GNU as -O2 only swaps with the PRECEDING insn. So it is the original ASPSX reorder doing what our REORDER_TUS substitute structurally cannot — an assembler gap, §182/§188 one level deeper. Also records that this function's old 'epilogue unreachable' verdicts are stale. §466, from matching main itself (509 ins, -O0): inside a MEMORY ADDRESS, base + i*K expands to a (mult reg K) that force_operand emits INDEX-first; rewriting as base + ((i*(K>>n))<<n) gives the target's BASE-first addu. Value context is unaffected, which is why it hides. Plus five supporting -O0 idioms (COMPONENT_REF for strided stores, pad[6] for the 0x38 frame, a dead register var to keep $s0 live, (*(u16*)x)++ vs +=1, and MEM-operand-0 argument order).