Files
BFM-decomp/cookbook/C0410.md
T

851 B

§369 — REUSE THE COMPARE CONSTANT'S OWN VARIABLE FOR A MASK THAT KEEPS COALESCING (P31 S68; md_SC07_004/func_801AEC38, 365 ins)

When a mask result keeps coalescing onto a dying hard-pinned register, assign it into the variable that held the COMPARE CONSTANT:

d = 0xC000;
if (w == d) { d = raw & 0xFFF; ... } else { d = raw & 0xFFF; ... }

That moved the andi from $a0 to $v0 at ZERO length cost — cse still hoists the duplicated andi into the bne delay slot.

A frame rule this sharpens (with §333/§358): aggregates get their stack slot at BLOCK ENTRY; scalars only get one when &x is expanded, and slots are 8-byte aligned. So an INNER-BLOCK u8 pad1[8] lands BEFORE later address-taken scalars — block placement of a pad is a frame ordering dial, not only a size dial. (Here it was what hit -0xB0.)