cvs commit: src/sys/i386/include _types.h

David Schultz das at FreeBSD.ORG
Thu Mar 6 02:11:12 UTC 2008


On Wed, Mar 05, 2008, Colin Percival wrote:
> Bruce Evans wrote:
> >   Modified files:
> >     sys/i386/include     _types.h
> >   Log:
> >   Change float_t and double_t to long double on i386.
>
> Doesn't this have a rather severe performance impact on any code which
> uses double_t?

Yes, if the code is compiled with -msse2. Otherwise, doubles get
fed to the i387 anyway.

On Thu, Mar 06, 2008, Peter Jeremy wrote:
> npx.h currently defines __INITIAL_NPXCW__ as 0x127f which makes the x87
> emulate double (53-bit) precision rather than its native 64-bit long
> double.  Doesn't this change also need a corresponding change to npx.h
> to make the x87 run with 64-bit precision?

Technically Bruce's change isn't wrong without changing the
default precision, it's just rather pointless. (Why tell programs
to store variables in a wider format if you're just going to
evaluate them in a narrower format anyway?) So I guess I agree
that if we're going to go down this path, we ought to just bite
the bullet and change npx.h and contrib/gcc/config/i386/freebsd.h
to use 64-bit precision by default on i386.


More information about the cvs-src mailing list