mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-05 08:57:59 -04:00
917 B
917 B
§334 — A RELOAD SPILL SLOT IS ROUNDED TO BIGGEST_ALIGNMENT (8B), SO ONE SPILLED 4-BYTE PSEUDO CAN GROW THE FRAME BY 16 (P31 S67; byte-proven ov_SC05_008/func_8017DF68, 82 -> 53 residual)
sw $a1,0x60($sp) looked like a volatile-parameter home; it is a RELOAD SPILL. alter_reg calls
assign_stack_local(mode, size, -1), and the -1 means BIGGEST_ALIGNMENT — 8 bytes on MIPS — used
for both the alignment AND the size rounding. So a single spilled 4-byte pseudo took 68 bytes of
locals to var_size 80 and the frame from 0x88 to 0x90.
Companion lever from the same function: two-temp field updates
(tx = v.vx + 8; ty = v.vy - 8; v.vx = tx; v.vy = ty;) emit lhu/lhu/addiu/addiu/sh/sh instead of
serial lhu/addiu/sh, and that reshuffles global.c's log2(n_refs)*n_refs/live_length priority
enough to change WHICH pseudo is the spill victim — closing the remaining 53 rows for free.