Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 10:24:22 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        David Schultz <das@freebsd.org>
Cc:        src-committers@freebsd.org, Peter Jeremy <peterjeremy@optushome.com.au>, cvs-all@freebsd.org, Bruce Evans <bde@freebsd.org>, Colin Percival <cperciva@freebsd.org>, cvs-src@freebsd.org
Subject:   Re: cvs commit: src/sys/i386/include _types.h
Message-ID:  <20080307100713.I10724@delplex.bde.org>
In-Reply-To: <20080306063746.GC48339@zim.MIT.EDU>
References:  <200803051121.m25BLE03035426@repoman.freebsd.org> <20080305182531.GS68971@server.vk2pj.dyndns.org> <20080306021222.GA46783@zim.MIT.EDU> <47CF5D19.3090100@freebsd.org> <20080306033246.GA47280@zim.MIT.EDU> <20080306062301.GX68971@server.vk2pj.dyndns.org> <20080306063746.GC48339@zim.MIT.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 6 Mar 2008, David Schultz wrote:

> On Thu, Mar 06, 2008, Peter Jeremy wrote:
>> On Wed, Mar 05, 2008 at 10:32:46PM -0500, David Schultz wrote:
>>> gcc doesn't get any of this right. FreeBSD/i386 fixes the problem
>>> for /doubles/ by setting the i387 to use 53-bit precision.

>> Note that FreeBSD/amd64 does not do this when running i386 binaries
>> so you can get discrepancies between running the same program natively
>> vs running it in compatibility mode.

On my list of things to fix.

> Good point. I don't think i386 ever got fixed to do the
> appropriate mode change for Linux binaries, either, BTW.

Actually, someone named das fixed this on 2005/02/06 in rev.1.136 of
i386/linux/linux_sysvec.c, but the fix is buggy -- it accesses the
i387 directly and thus causes npxdna() traps which should cause panics
since direct access to the i387 is not permitted (it should use
npxinit(), which was originally for the corresponding initialization
in setregs() but is no longer used there since the normal initialization
is now virtual).

Bruce



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