[fpc-devel] mstackrealign

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 23 11:14:19 CET 2010

On 22 Nov 2010, at 21:58, Den Jean wrote:

> http://bugs.freepascal.org/view.php?id=17384
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
> can a C-ABI expert enlight us on this ABI mess.
> Does this also effect calling in general of C-functions from Free  
> Pascal.

Afaik, the Linux/i386 abi only mandates 4 byte stack alignment. That  
means that any function requiring a higher stack alignment has to  
realign the stack. That's what the new -mstackrealign gcc option does.

FPC also only guarantees 4 byte stack alignment under Linux/i386. It  
does not have the equivalent of an -mstackrealign option, though it  
probably will have to be added one day to fix http://bugs.freepascal.org/view.php?id=15582 
  (which is basically the same issue for which that option was added  
to gcc).


More information about the fpc-devel mailing list