From owner-freebsd-bugs Sun Jul 15 4:10:15 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7CC0D37B403 for ; Sun, 15 Jul 2001 04:10:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6FBA7A22351; Sun, 15 Jul 2001 04:10:07 -0700 (PDT) (envelope-from gnats) Date: Sun, 15 Jul 2001 04:10:07 -0700 (PDT) Message-Id: <200107151110.f6FBA7A22351@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/28966: math libraries in linux emulation do not return same results Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/28966; it has been noted by GNATS. From: Bruce Evans To: Jim Pirzyk 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