From owner-freebsd-current@FreeBSD.ORG Wed Mar 9 18:59:13 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9CF416A4CE for ; Wed, 9 Mar 2005 18:59:13 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA16843D2F for ; Wed, 9 Mar 2005 18:59:11 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (8.13.3/8.13.3) with ESMTP id j29Ix7t6011008 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 9 Mar 2005 19:59:07 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.3/8.13.3/Submit) id j29Ix7BP011007 for current@freebsd.org; Wed, 9 Mar 2005 19:59:07 +0100 (CET) Date: Wed, 9 Mar 2005 19:59:07 +0100 From: Divacky Roman To: current@freebsd.org Message-ID: <20050309185907.GA10766@stud.fit.vutbr.cz> References: <20050309092749.GA72315@stud.fit.vutbr.cz> <20050309170100.GG50186@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050309170100.GG50186@hub.freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 Subject: Re: amd64 default CFLAGS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 18:59:13 -0000 On Wed, Mar 09, 2005 at 05:01:00PM +0000, Kris Kennaway wrote: > On Wed, Mar 09, 2005 at 10:27:49AM +0100, Divacky Roman wrote: > > hi, > > > > why is it necessary (if its at all) to have this: > > -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow in default CFLAGS for amd64 > > architecture? > > This is the default COPTFLAGS, not CFLAGS, right? You can't use > special instructions like sse in the kernel because they require extra > register state operations that would cost performance. (from sys/conf/kern.mk) CFLAGS+= -mcmodel=kernel -mno-red-zone \ -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow \ -msoft-float -fno-asynchronous-unwind-tables I'd call it CFLAGS ;) (from sys/i386/i386/support.s) ENTRY(sse2_pagezero) isnt this use of sse in kernel? why is it allowed in this case and not allowed in general. any measurements how much does it hurt performance? roman