IT lexicon › Programming › HFA (homogeneous floating-point aggregate)

HFA (homogeneous floating-point aggregate)

Programming På svenska → Updated: 2026-11-06

Arm's rule for passing a struct made only of same-typed floats in floating-point registers, instead of packing it into integer registers or memory.

A struct with one to four members, all of the same floating-point type, counts as a homogeneous aggregate in the AAPCS family. On AArch64 a struct vec3 { float x, y, z; } is therefore passed in s0, s1 and s2, and returned the same way. That is exactly what graphics and physics code wants, since the values are headed for those registers anyway. AArch64 also has a vector flavour, HVA, for short SIMD types.

Two details trip people up. If there aren't enough registers left, the whole aggregate goes on the stack — never half in registers and half in memory. And the rule demands an identical type: mix float and double and it is no longer an HFA. Microsoft did the equivalent for x64 with vectorcall.

← Back to the lexicon