1.2 KiB
§172a — TWO DECOMPILATION TELLS FROM THE SAME DIG (P30 S50-Max)
The lhu/lh tell. gcc-2.7.2 MIPS emits lhu for a plain HImode COPY (movhi — an s16-to-s16
assignment) and lh for a PROMOTION to int (extendhisi2_internal). A lhu+lh DOUBLE-LOAD of
the same address is therefore an s16 value used both ways in one region — the ?:-arm-plus-
compare shape. When typing variables from asm: lhu ⇒ the destination is s16; lh ⇒ the use is
promoted. (Corollary of force_not_mem: s32 x = shortmem and s16 t = shortmem; s32 x = t; are
RTL-IDENTICAL — the s16-temp spelling axis does not exist for the compiler.)
The macro-vs-inline tell. A select chain whose final code RE-EVALUATES its compares in the
arms comes from a TEXTUALLY REPEATING MACRO (#define MIN2(a,b) ((a)<(b)?(a):(b)) nested), never
from an inline function: gcc-2.7.2 evaluates inline-function arguments ONCE into parameter
pseudos, collapsing the repeats (measured on the 246-ins body: the inline form compiles to 209
ins). When a family's shape shows duplicated compare work, reconstruct it as nested macros with
repeated operand expressions — that redundancy is load-bearing for byte-matching.