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

Bruce Evans brde at optusnet.com.au
Thu Mar 6 00:22:38 UTC 2008


On Thu, 6 Mar 2008, Peter Jeremy wrote:

> On Wed, Mar 05, 2008 at 11:21:14AM +0000, Bruce Evans wrote:
>>  Log:
>>  Change float_t and double_t to long double on i386.  All floating point
>>  expressions on i386 are evaluated in the range of the long double type,
>
> 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?

Not quite.  The precision can be changed at runtime too, but much more
than changing the control word is required for completely working
64-bit on precision x87s in C.  It is also necessary to change gcc.
Apart from the 20 year old bugs in the support for extra precision,
it is necessary to not configure the almost-hard-coded support for
FreeBSD's __INITIAL_NPXCW__ (this support mainly breaks increasing
the precision at runtime by evaluating too much at compile time).

Bruce


More information about the cvs-all mailing list