evolve / improve Native Gen Format in Format.hs (especially in context of post simd cleanup)
GlobalReg represents the STG machine registers. However, some STG registers get aliased to the same machine registers (e.g.
FloatReg 1 and
DoubleReg 1; see
Note [Overlapping global registers]). To make matters worse, we assume that we can always determine the
CmmType of a
GlobalReg. However, in the case of SIMD registers this isn't necessarily the case (e.g. a XMM register may contain 1 or 2 double-precision floats, or 1, 2, 4, 8, or 16 integers).
data Format = II8 | II16 | II32 | II64 | FF32 | FF64 | FF80 deriving (Show, Eq)
currently this is meant to "encode" both physical bit size AND which register class the value is. we also have the issue that this register class distinction stops being true once simd integer operations.
this gets worse with simd once we want to track (perhaps?) the size / number of elements used in the xmm/ymm/zmm / arm simd vectors.
perhaps also: signedness?
this actually also relates to how GlobalRegisters and Format are related! is GlobalRegisters meant for STG machine vs native Machine?
this intersects with ABI questions. Plus we currently have eg Float and Double which are different logically/semantically, BUT the same registers in most native machine architectures