From owner-cvs-all Wed Nov 14 15:27:15 2001 Delivered-To: cvs-all@freebsd.org Received: from femail13.sdc1.sfba.home.com (femail13.sdc1.sfba.home.com [24.0.95.140]) by hub.freebsd.org (Postfix) with ESMTP id 1D65537B405; Wed, 14 Nov 2001 15:27:07 -0800 (PST) Received: from interjet.peek.org ([24.1.69.163]) by femail13.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011114232706.MIMR1669.femail13.sdc1.sfba.home.com@interjet.peek.org>; Wed, 14 Nov 2001 15:27:06 -0800 Received: from [207.76.207.129] (PBG4.peek.org [10.1.10.118]) by interjet.peek.org (8.9.1a/8.9.1) with ESMTP id PAA59636; Wed, 14 Nov 2001 15:27:05 -0800 (PST) Mime-Version: 1.0 X-Sender: mark@interjet.peek.org Message-Id: In-Reply-To: <20011115093118.G40270@monorchid.lemis.com> References: <200111130044.fAD0iL972345@freefall.freebsd.org> <20011115093118.G40270@monorchid.lemis.com> Date: Wed, 14 Nov 2001 15:26:58 -0800 To: Greg Lehey From: Mark Peek Subject: Re: cvs commit: src/sys/powerpc/powerpc machdep.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 9:31 AM +1030 11/15/01, Greg Lehey wrote: >On Monday, 12 November 2001 at 16:44:21 -0800, Mark Peek wrote: >> mp 2001/11/12 16:44:21 PST >> >> Modified files: >> sys/powerpc/powerpc machdep.c >> Log: >> Don't enable FP in the kernel. It is not needed when -msoft-float is used. > >Why is FP needed at all? Without -msoft-float, gcc uses the FP registers for code optimization like 8 byte structure copies. For instance, this contrived example: struct foo { char c[8]; } a, b; bar() { a = b; } produces this: ... bar: lis 9,a@ha la 9,a@l(9) lis 11,b@ha la 11,b@l(11) lfd 0,0(11) <==== stfd 0,0(9) <==== blr ... and with -msoft-float: ... bar: lis 9,a@ha la 9,a@l(9) lis 11,b@ha la 11,b@l(11) lwz 12,4(11) lwz 11,0(11) stw 11,0(9) stw 12,4(9) blr ... Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message