[fpc-devel] Data alignment feature

Jonas Maebe jonas at freepascal.org
Sat Jan 27 20:55:44 CET 2018


J. Gareth Moreton wrote:
> On Sat 27/01/18 16:33 , Jonas Maebe jonas at freepascal.org sent:
>>
>> The x86-64 ABIs mandate 16 byte alignment of the stack after the
>> compiler-generated entry code.
> 
> That is true, but it's more the issue of, say, declaring a 4-byte variable and then a variable that must be 
> aligned to a 16-byte boundary.

That is implicit. The compiler always has aligned local variables to
their declared alignment. There's only an issue if the ABI stack
alignment is smaller than the variable's alignment, as the compiler
currently does not have support to realign the stack to a custom
alignment on entry.


Jonas



More information about the fpc-devel mailing list