[fpc-devel] Difficulty in specifying record alignment... and more compiler optimisation shenanigans!

Florian Klämpfl florian at freepascal.org
Sun Oct 27 09:13:01 CET 2019


Am 23.10.19 um 22:36 schrieb J. Gareth Moreton:
> So I did a bit of reading after finding the "mpx-linux64-abi.pdf" 
> document.  As I suspected, the System V ABI is like vectorcall when it 
> comes to using the XMM registers... only the types __m128, __float128 
> and __Decimal128 use the "SSEUP" class and hence use the entire 
> register.  The types are opaque, but both their size and alignment are 
> 16 bytes, so I think anything that abides by those rules can be 
> considered equivalent.
> 
> If the complex type is unaligned, the two fields get their own XMM 
> register.  If aligned, they both go into %xmm0.  At least that is what I 
> gathered from reading the document - it's a little unclear sometimes.

I briefly tested with god bolt (https://godbolt.org/): records of two 
double are passed in two xmm registers regardless of the alignment, two 
floats (so single) are passed in one xmm register.


More information about the fpc-devel mailing list