gcc/libm floating-point bug?
David Schultz
das at FreeBSD.ORG
Tue May 20 11:03:43 PDT 2003
On Tue, May 20, 2003, Terry Lambert wrote:
> Jon Lido wrote:
> > I've been running 5-CURRENT on my laptop for about a week now. I believe I
> > may have found a bug in FreeBSD's gcc floating-point code generation, or
> > perhaps more likely, in the math library.
> [ ... ]
> > I know my floating point hardware is fine, since I used to run xmms and artsd
> > fine under Linux before I switched the machine to FreeBSD.
> >
> > I'd appreciate any help with further isolating and reproducing the bug. Has
> > anyone else experienced this problem?
>
> There was a recent discussion about -mieee being set by
> default in one of the Makefiles, which leaked into the
> main code base. It may be that you need the option, or
> you need to disable it (depending on when you downloaded
> you copy of -current).
That's for an Alpha-specific problem. The i386-specific problem
is due to a bug gcc has that involves Pentium 4 code generation
and aliasing. The latter can be fixed by removing
-march=pentium4, disabling optimization, or upgrading to gcc 3.3.
The former is intentional and not expected to change; gcc
generates non-standard FP math code on Alpha because it saves a
few instructions to deal with NaNs, etc. We work around it by
setting -mieee in bsd.cpu.mk for Alpha.
More information about the freebsd-current
mailing list