mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-05 17:03:23 -04:00
1.1 KiB
1.1 KiB
§383 — TWO TOOLCHAIN FACTS THE PACKS DID NOT CARRY (P31 S69)
- maspsx requires DECIMAL memory-operand offsets in verbatim asm.
0x40($sp)dies withinvalid literal for int() with base 10; write64($sp). Hex is fine for plain immediates. Found while bankingmain/func_80026514(239 ins) the §265 verbatim-asm way — that function is genuinely HANDWRITTEN: itsD_800B99DAfetch is a gas macro expansion oflbu $v1,0xA3AA($t2)intolui $at,1 / addu $at,$t2,$at / lbu $v1,-0x5C56($at), which gcc cannot emit. - A 4-byte struct local is BLKmode, so
assign_stack_localgives it 8-byteBIGGEST_ALIGNMENT. Declaringxy0/xy1ass32instead of a 4-byte struct is the difference between frame 0x130 and 0x138 (func_8001EFE0). convert_modesreturns x unchanged whenoldmode == GET_MODE(x), so no cast can emit the(s16)sll/srapair. Only ans16local assigned in one block and consumed in a distant one does — and the copy must sit ABOVE the guard, or it coalesces away against the target'saddu $a1,$v0,$zero(func_8002D904).