mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-07 09:27:55 -04:00
1.0 KiB
1.0 KiB
§364 ★ — THE libgpu P_TAG BITFIELD SPELLING IS OPT-LEVEL DEPENDENT (P31 S68; two functions, opposite verdicts, same session)
- At
-O0the bitfield is REQUIRED. md_MAIN_003/func_800D0D6C (345 ins): theunsigned addr:24read-modify-write is what makesstore_fixed_bit_fieldexpand the VALUE first and then the dest read, which fixes the finalor's operand order. The hand-written(X & 0xFF000000) | (Y & 0xFFFFFF)gets the operands BACKWARDS. - At
-O2the bitfield is BYTE-WRONG. ov_SC01_000/func_8017E594 (357 ins): the bitfield setsMEM_IN_STRUCT_P, so the alias oracle CSEs the secondD_800B9A02load across the tag store — -4 instructions per block, 357 → 325. The manual mask/or form is required.
Same struct, same field, opposite correct spellings, decided by the TU's opt level. This is §351's
/s dial with a concrete high-frequency victim, and the first case where the RIGHT answer FLIPS
between -O0 and -O2. Check the TU's opt level before choosing the spelling.