mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-05 08:57:59 -04:00
609 B
609 B
§382 — TWO FOLD REASSOCIATIONS THAT NEED THEIR OWN STATEMENT (P31 S69)
gcc-2.7.2's fold rewrites these before you ever see RTL, so the fix is always "split the
expression", never "add a cast":
A * (X / 0x7F * 0x3FFF)folds to(A * 0x3FFF) * X— the 0x3FFF scaling needs its own statement (func_80040DE8).A + (B + C)reassociates to(A + C) + B— an address split into two statements blocks it (func_80021284).(x << 9) | CONST | varreassociates so that only the shift gets hoisted — the fourgetTPagebases must be explicit pre-loop variables (func_8001EFE0).