Date: Sat, 10 Nov 2012 22:33:42 -0600 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 Message-ID: <509F2AA6.9050509@freebsd.org> In-Reply-To: <201211091856.qA9IuRxX035169@svn.freebsd.org> References: <201211091856.qA9IuRxX035169@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. > > MFC after: 1 week > > Modified: > head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp > > Modified: head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp > ============================================================================== > --- head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:23:38 2012 (r242834) > +++ head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp Fri Nov 9 18:56:27 2012 (r242835) > @@ -416,12 +416,12 @@ X86Subtarget::X86Subtarget(const std::st > assert((!In64BitMode || HasX86_64) && > "64-bit code requested on a subtarget that doesn't support it!"); > > - // Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris (both > - // 32 and 64 bit) and for all 64-bit targets. > + // Stack alignment is 16 bytes on Darwin, Linux and Solaris (both 32 and 64 > + // bit) and for all 64-bit targets. > if (StackAlignOverride) > stackAlignment = StackAlignOverride; > - else if (isTargetDarwin() || isTargetFreeBSD() || isTargetLinux() || > - isTargetSolaris() || In64BitMode) > + else if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() || > + In64BitMode) > stackAlignment = 16; > } > I'd like to object to this. We have an identical ABI to Linux (and Solaris, as far as I know). Splitting this by platform will only propagate the stack alignment breakage further -- what we need is LLVM/our C library to handle different alignments. Please fix this for real instead of balkanizing the ABI support in LLVM and introducing different ABIs for LLVM and GCC to FreeBSD. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509F2AA6.9050509>