From owner-svn-src-all@FreeBSD.ORG Sun Nov 11 04:33:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B8ED495; Sun, 11 Nov 2012 04:33:51 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 35FD78FC15; Sun, 11 Nov 2012 04:33:50 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MDB000003C83900@smtpauth3.wiscmail.wisc.edu>; Sat, 10 Nov 2012 22:33:44 -0600 (CST) Received: from comporellon.tachypleus.net (adsl-71-150-249-157.dsl.mdsnwi.sbcglobal.net [71.150.249.157]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MDB00ERI3C60F20@smtpauth3.wiscmail.wisc.edu>; Sat, 10 Nov 2012 22:33:43 -0600 (CST) Date: Sat, 10 Nov 2012 22:33:42 -0600 From: Nathan Whitehorn Subject: Re: svn commit: r242835 - head/contrib/llvm/lib/Target/X86 In-reply-to: <201211091856.qA9IuRxX035169@svn.freebsd.org> To: Dimitry Andric Message-id: <509F2AA6.9050509@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=71.150.249.157 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.11.11.42417, SenderIP=71.150.249.157 References: <201211091856.qA9IuRxX035169@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121103 Thunderbird/16.0.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 04:33:51 -0000 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