From owner-svn-src-head@FreeBSD.ORG Wed Jan 5 14:50:43 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 B587A106564A; Wed, 5 Jan 2011 14:50:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 5398E8FC1D; Wed, 5 Jan 2011 14:50:43 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 4992B58140; Wed, 5 Jan 2011 08:50:42 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id SyApKtUjSIYq; Wed, 5 Jan 2011 08:50:42 -0600 (CST) Received: from comporellon.tachypleus.net (unknown [76.210.75.5]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 5EEF758137; Wed, 5 Jan 2011 08:50:41 -0600 (CST) Message-ID: <4D248540.3030602@freebsd.org> Date: Wed, 05 Jan 2011 08:50:40 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101214 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201101042051.p04KpSGk054564@svn.freebsd.org> <201101050759.50877.jhb@freebsd.org> <4D2473C6.40102@FreeBSD.org> <201101050928.30748.jhb@freebsd.org> In-Reply-To: <201101050928.30748.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Kurtsou , src-committers@freebsd.org, svn-src-all@freebsd.org, Dimitry Andric , svn-src-head@freebsd.org, Alexander Best 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 14:50:43 -0000 On 01/05/11 08:28, John Baldwin wrote: > On Wednesday, January 05, 2011 8:36:06 am Dimitry Andric wrote: >> On 2011-01-05 13:59, John Baldwin wrote: >>>> 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. >>> It strikes me that we really want clang/gcc to have some sort of >>> '-mno-hwfloat' so we don't keep having to add new flags in the future. >> This is not just about floats, clang can also use SSE/AVX instructions >> for e.g. memset(), memcpy() and the like, or even for structure >> assignments. > Yes, but the thing that all these extensions have in common is that they use > FPU state (i.e. subject to DNA traps, managed via *SAVE and *RSTOR, etc.) > and that is the problem with using them in boot code or rtld. What I would > want a -mno-hwfloat flag to do is to disable use of anything that would > require working FPU state handling. You would also want this to be cross-platform, in which case it's more than floating point. E.g. on powerpc, you also want to disable both FP and vector extensions, which use separate sets of instructions and registers. I guess overriding CPU type to be something very old (386?) potentially deoptimizes the code? -Nathan