mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 14:02:04 -04:00
0d92d10299
- the moves: retype four accumulators int -> short in ONE edit, delete the five hand temps that were spelling the truncation, and type the colour temp to its destination field's own width (u8). Measured A/B/C on bytes: unsigned int 34, short 1, unsigned short 1, u8 0. - mechanism: all four missing instructions were the same one — a move after an addiu whose result is re-read through a 16-bit shift. A narrowing assignment expands to a mode-changing copy, and combine_regs ties source into destination only when the source DIES there (local-alloc.c:1855, return 0 at :1881); the wide temp is still live in the following sign-extended test, so the copy survives. At int the copy is same-mode, the source dies, the tie happens, and combine then re-selects the whole counter into the pre-shifted domain. The last instruction is cse's mode gate in insert_regs (cse.c:1019-1021, :1029-1032). - it confirms R20's shape and refines it: the group retype must be keyed on the residual's missing-move SET, since R12 is per-declarator and its single moves topped out at 24 here — a hill-climb cannot reach a four-way retype. - delever_pack.py was missing an import for the neighbours block added an hour ago, so two packs shipped without neighbours.txt and both agents said so. Fixed; all 34 packs now carry it. - method note from the agent, now in the briefs: dump the target function WHOLE off the tree's own object rather than reading the residual's hunks — the hunk view had scrambled two moves into branch delay slots and hid that four differences were one repeated shape.