Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2003 11:03:36 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: gcc/libm floating-point bug?
Message-ID:  <20030520180336.GB2372@HAL9000.homeunix.com>
In-Reply-To: <3ECA526F.A6E4A085@mindspring.com>
References:  <200305201025.30296.jlido@goof.com> <3ECA526F.A6E4A085@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030520180336.GB2372>