Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2001 04:10:07 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/28966: math libraries in linux emulation do not return same results
Message-ID:  <200107151110.f6FBA7A22351@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/28966; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Jim Pirzyk <Jim.Pirzyk@disney.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/28966: math libraries in linux emulation do not return same
 results
Date: Sun, 15 Jul 2001 21:06:32 +1000 (EST)

 On Sat, 14 Jul 2001, Jim Pirzyk wrote:
 
 >  So the solution to my problem was to set the __INITIAL_NPXCW__ to
 >  0x37F.  What I can think of is that the freebsd binary sets
 >  the Control Word to this before running but the linux binary 
 >  does not (because it is assumed to already be set by the kernel
 >  at boot time).
 
 It's sort of the opposite.  The FreeBSD kernel sets the control
 word to __INITIAL_NPXCW__.  Most FreeBSD binaries have never set it.
 They depend on the kernel setting it.  Linux C binaries used to set
 it to 0x37F in the C startup code (except very old Linux C binaries
 set it to 0x272 IIRC, and there at least used to be a linking option
 to unmask exceptions (control word 0x372?).  Linux C binaries stopped
 setting it a few years ago.
 
 >  So I would think the linux kernel module would need
 >  to set it also.
 
 Yes, all emulators have this bug.
 
 Bruce
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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