[fpc-devel] Double-check Linux 64-bit SSE return value handling

J. Gareth Moreton gareth at moreton-family.com
Mon Dec 4 13:01:55 CET 2017


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.

Kit


On Sun 03/12/17 14:18 , Jonas Maebe jonas at freepascal.org sent:
> On 03/12/17 01:01, J. Gareth Moreton wrote:
> 
> 
> 
> > The rules of the
> 
> > x86_64 ABI - http://refspecs.linuxbase.org/elf/x86_64-abi-0.21.pdf - page 15-17, specify that the 
equivalent
> > of a __float128 or __m128 should be split into
> two classes, with the lower half being SSE and the upper half
> > being SSEUP, hence the two can be merged into a
> single XMM register.
> 
> 
> FPC does not have a way to specify equivalent types of either __float128 
> 
> or __m128 at this time. FPC needs either a dedicated vector type or an 
> 
> array modifier (similar to "packed") to represent vector types. 
> 
> Otherwise it becomes very muddy regarding which types should be/are 
> 
> treated as vectors and which as plain plain arrays in context of ABI 
> 
> specifications.
> 
> 
> 
> 
> 
> Jonas
> 
> _______________________________________________
> 
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
> 
> 
> 
> 




More information about the fpc-devel mailing list