Date: Wed, 14 Nov 2001 15:26:58 -0800 From: Mark Peek <mark@peek.org> To: Greg Lehey <grog@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/powerpc/powerpc machdep.c Message-ID: <p05101008b818a9b71348@[207.76.207.129]> In-Reply-To: <20011115093118.G40270@monorchid.lemis.com> References: <200111130044.fAD0iL972345@freefall.freebsd.org> <20011115093118.G40270@monorchid.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05101008b818a9b71348>