Problems with floating point exception flags

David Schultz das at FreeBSD.ORG
Wed May 5 21:31:39 PDT 2004


On Wed, May 05, 2004, Marcel Moolenaar wrote:
> On Tue, May 04, 2004 at 06:39:04AM -0700, David Schultz wrote:
> > 
> > Here is a better kernel patch.  Instead of treating all the bits
> > of the FPCR as sticky, it merely treats the exception flags that
> > way.  After reading the source carefully, I'm pretty sure this is
> > the right fix, but I can't test it without working hardware.
> > I also uncovered a bug in the way the software floating-point
> > routines handle underflow.  See below.
> 
> I built and booted a kernel with these patches. Trying to exercise the
> code with the files at http://people.freebsd.org/~das/alpha yield:

Thanks!

> alpha% ./te
> Should be 00: 00
> Floating exception (core dumped)
> May  5 19:00:11 alpha kernel: pid 638 (te), uid 4152: exited on signal 8 (core dumped)

You need to compile the program with gcc's -mieee option in order
to get floating point to work in a reasonable way on alpha.  If
you could try the program compiled with -mieee, that would be great.


More information about the freebsd-alpha mailing list