PPC64 Compiler bug !!

linas at austin.ibm.com linas at austin.ibm.com
Fri Jun 13 04:55:28 EST 2003


Hi Steve,

On Thu, Jun 12, 2003 at 01:39:59PM -0500, Steve Munroe wrote:
> linas writes:
>
> > See line 26, 27 above: lfd, stfd !!!?? The first 6-bits of 0xc8, 0xd8
> are
> > primary opcodes 50 and 54, load and store floating point double.
> >
> > Surely when I wake up, it will be clear that this was a dream ??
>
> No this is not a dream but a "feature" of gcc. Unless you explicitly tell
> it not to use hardware floating point (-msoft-flost) gcc may use fprs as
> extra volatile registers for 8-byte move/copies. This seems to be left
> over from ppc32 there is may have been a good idea (lfd/stfd replaces
> lwz/lwz/stw/stw). But on PPC64 this is dumb unless you are actually doing
> floating point.
>
> Send you cards and letters to our friend Alan Modra on this topic.

OK, that's a sane answer.  I first saw this when compiling a custom
kernel module; I see that the standard linux kernel uses -msoft-flost
in its standard Makefile, and I will be tracking down this custom code
shortly.

--linas

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list