Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2008 21:12:22 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        Colin Percival <cperciva@FreeBSD.ORG>, Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, Bruce Evans <bde@FreeBSD.ORG>, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/include _types.h
Message-ID:  <20080306021222.GA46783@zim.MIT.EDU>
In-Reply-To: <20080305182531.GS68971@server.vk2pj.dyndns.org>
References:  <200803051121.m25BLE03035426@repoman.freebsd.org> <20080305182531.GS68971@server.vk2pj.dyndns.org>

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



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