From owner-svn-src-head@FreeBSD.ORG Wed Jan 5 12:43:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6E62106566B; Wed, 5 Jan 2011 12:43:31 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id A50D68FC0A; Wed, 5 Jan 2011 12:43:30 +0000 (UTC) Received: by fxm16 with SMTP id 16so14848777fxm.13 for ; Wed, 05 Jan 2011 04:43:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=R+rPherEVpJK4fT6iyO6RdqnfkwGLCnK8MUYcWhJ7Cs=; b=E5NxN78Y6zy35nnB4ZrM2eFKJw+VXw/V1uvJ9LBDDg1r7VgivAjtcU17R/SiO/7X1c oXvV4hHHhU0gl9L0x2oAemXYqWsjNKLKFef1L/IM0T3MrvyheBdsJjED9M6Yl04VI9KL ZN21u4lwrww4PR2f9I2M++GkTy9lknANJPvTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=l0U7Fb/ur/rTtGsApydjcYA6myZHTIETxsrXaStM4oQIU9K8G+RwScJjkmQnu+mkjw fpLDbIQCzrbhn03N9qVr4G7cyHyFN3WTNcQZIfFqqSh46gBw7Xa5sl987tDacxfONk5h wTIn20jlM+ssltJmc6slzIaA2Q/mLZnMTVnzU= Received: by 10.223.86.3 with SMTP id q3mr127899fal.139.1294230004990; Wed, 05 Jan 2011 04:20:04 -0800 (PST) Received: from localhost (lan-78-157-92-5.vln.skynet.lt [78.157.92.5]) by mx.google.com with ESMTPS id y3sm5446506fai.14.2011.01.05.04.20.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 04:20:03 -0800 (PST) Date: Wed, 5 Jan 2011 14:19:10 +0200 From: Gleb Kurtsou To: Alexander Best Message-ID: <20110105121910.GA1841@tops.skynet.lt> References: <201101042051.p04KpSGk054564@svn.freebsd.org> <20110105011635.GA4952@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20110105011635.GA4952@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r216977 - in head/libexec/rtld-elf: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 12:43:31 -0000 On (05/01/2011 01:16), Alexander Best wrote: > On Tue Jan 4 11, Dimitry Andric wrote: > > Author: dim > > Date: Tue Jan 4 20:51:28 2011 > > New Revision: 216977 > > URL: http://svn.freebsd.org/changeset/base/216977 > > > > Log: > > On amd64 and i386, tell the compiler to refrain from generating SSE, > > 3DNow, MMX and floating point instructions in rtld-elf. > > > > Otherwise, _rtld_bind() (and whatever it calls) could possibly clobber > > function arguments that are passed in SSE/3DNow/MMX/FP registers, > > usually floating point values. This can happen, for example, when clang > > generates SSE code for memset() or memcpy() calls. > > the sorting order for these flags seems to be: > > -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 > > see 'grep -R "\-no-sse" /usr/src'. maybe the sorting order should stay > consistent? > > also what's the status of clang? will these flags make sure that newer > cpu extension won't be activated? i checked > contrib/llvm/tools/clang/include/clang/Driver/Options.td > and clang has support for: > > -m3dnowa > -mssse3 > -msse4a > -msse4 > -msse4_1 > -msse4_2 > -maes > -mavx > > since these extensions only get set in a hand full of files maybe special > cases for CC == clang can be added. Why not to add NO_HWFLOAT knob (or similar) into makefile infrastructure. And set CFLAGS accordingly, depending on CC, arch, etc. These flags are getting rather common in tree. > also maybe you could have a look at the attached patch. i sent this to hackers@ > and nobody objected, but nobody wanted to commit the patch unfortunately. > > cheers. > alex