[fpc-devel] Double-check Linux 64-bit SSE return value handling
Jonas Maebe
jonas at freepascal.org
Tue Dec 5 22:08:02 CET 2017
On 04/12/17 13:01, J. Gareth Moreton wrote:
> Fair enough. I would have thought that "array[0..3] of Single" would count - granted, there's no clean way
> to specify a type-specific byte alignment yet, it seems.
>
> The question came about because it looked like the lower 2 Singles were put into one XMM register and the
> upper 2 Singles put into another, instead of into an XMM register each, say.
That's because the ABI specifies that arguments are passed per
"eightbyte". Two 4-byte elements of an aggregate that have the same
register class (SSE in this case) are merged into a single eightbyte for
parameter passing (and function returning).
FWIW, a more recent version of the ABI is linked from
https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI
Jonas
More information about the fpc-devel
mailing list