On 2012-11-11 05:33, Nathan Whitehorn wrote:
On 11/09/12 12:56, Dimitry Andric wrote:
Author: dim
Date: Fri Nov  9 18:56:27 2012
New Revision: 242835
URL: http://svnweb.freebsd.org/changeset/base/242835

Log:
    Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
    the FreeBSD ABI requires.  This is essentially a revert of upstream llvm
    commit r126226, and it will be reverted by upstream too.
...
I'd like to object to this. We have an identical ABI to Linux (and
Solaris, as far as I know).

Apparently Linux has standardized on 16-byte stack alignment for 32-bit
x86, somewhere in the past.  That is, it seems they were forced to do so
by the gcc maintainers.  Please read:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496

for all the details.


Splitting this by platform will only
propagate the stack alignment breakage further

Apparently, that breakage seems to have existed since the beginning.  I
don't think it can be fixed anymore; it is probably better to migrate to
x86_64 anyway, and repeat all the mistakes of the past once again. :-)


-- what we need is
LLVM/our C library to handle different alignments.

It seems like we need this for all our 32-bit x86 executables and shared
libraries, not only our system libraries.  At least, that is what I have
been told.


Please fix this for
real instead of balkanizing the ABI support in LLVM and introducing
different ABIs for LLVM and GCC to FreeBSD.

The balkanization was already there, since FreeBSD's ABI for 32-bit x86
executables has always used 4 byte stack alignment.  If anything, Linux
is the cause of the balkanization, since they switched from 4 to 16 byte
alignment somewhere along the road, and purposefully (or accidentally)
lost backwards compatibility.

If anything, we should probably send patches to upstream gcc to make
them aware of FreeBSD's specific stack alignment, if they are using 16
byte stack alignment now.
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to