Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2003 23:01:59 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        peter@FreeBSD.org
Subject:   Re: Removing fpu emulator
Message-ID:  <20030722221031.Y7914@gamplex.bde.org>
In-Reply-To: <20030722.050335.21271227.imp@bsdimp.com>
References:  <20030722.050335.21271227.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Jul 2003, M. Warner Losh wrote:

> In message <200307220811.h6M8BHIh059016@repoman.freebsd.org>, Peter
> Wemm writes:
> >  Log:
> >  Initiate de-orbit burn for fpu-less operation.  386+387 is still
> >  theoretically supportable, but you'd really be happier with FreeBSD 2.1.8
> >  on it.
>
> People should also note that a big reason for doing this is to improve
> floating point support on FreeBSD.  The old floating point emulator
> was getting in the way of those improvements.  I'd expect to see a

The partly-GPLed math emulator didn't get in the way of this.

> number of changes to libm over the coming days and weeks.  I'd also
> hope to see long double support improved in i386 like it is in amd64
> right now...

This can't be done without unimproving support for ordinary doubles
until longstanding bugs in gcc are fixed.

Hmm.  The bugs are avoided by default on amd64's by using SSE instructions.
They can be restored by forcing 387 instructions (-mfpmath=387).
Similarly in the opposite direction on some i386's.  The default is
to use 387 instructions and their buggy description in i386.md, but
-mfpmath=sse can be used to force use of SSE instructions if possible
(Pentium3 and AthlonXP and newer chips have single precision SSE, and
Pentium4 have double precision SSE).  The SSE instructions are non-
widening, so they automatically avoid both the bugs and the main feature
of i387 arithmetic -- it's supposed to be widening to reduce problems
in naively written code.  The FreeBSD default gives non-widening
arithmetic for doubles anyway, so I can't complain.

Bruce



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