Files
BFM-decomp/cookbook/C0432.md
T

962 B

§391 ★★ — A BYTE-ALIGNED STRUCT COPIES IN FOUR INSTRUCTIONS, A WORD-ALIGNED ONE IN TWO (P31 S69)

typedef struct { u8 b[8]; } Blk8; (src/shared/engine_types.h:497) is BYTE-aligned, so gcc-2.7.2 cannot assume word alignment and emits the unaligned quartet lwl / lwr / swl / swr per copy. A word-aligned aggregate of the same size (struct { int a, b; }) emits lw / sw.

Diff tell: an exact multiple of 2 instructions missing, scaling with the number of struct assignments. Measured while reproducing a twin: substituting an invented word-aligned Blk8 for the real byte-aligned one lost exactly 8 instructions across two copies (90 vs the target's 98) and read as a plausible "near, closeness 70" — a wrong TYPE masquerading as a codegen residual.

So: never invent an aggregate type to make a draft compile. Resolve it from src/shared/engine_types.h. An invented type does not fail loudly; it fails as a believable diff.