Date: Thu, 19 Jul 2001 09:35:21 -0700 From: Jim Pirzyk <Jim.Pirzyk@disney.com> To: freebsd-bugs@freebsd.org Subject: Fwd: Re: kern/28966: math libraries in linux emulation do not returnsameresults Message-ID: <01071909352106.07804@snoopy>
next in thread | raw e-mail | index | archive | help
FYI, So did others see this, or because I am now the owner, was
I the only one who saw it.
So Bruce went way over my head on this. The only response I have
to it, is that this fixed both my exp(53.2785) problem as well as
our smog particle program that showed the inital problem.
I have a little bit of knowelage...
- JimP
---------- Forwarded Message ----------
Subject: Re: kern/28966: math libraries in linux emulation do not
returnsameresults
Date: Thu, 19 Jul 2001 18:51:11 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
To: Jim Pirzyk <Jim.Pirzyk@disney.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
On Tue, 17 Jul 2001, Jim Pirzyk wrote:
> Not sure if this patch is technically correct in that it does not
> save off the existing value of cw, but just sets to to the
> default.
>
> *** ./sys/i386/linux/linux_sysvec.c.orig Sat Jul 14 22:32:48 2001
> --- ./sys/i386/linux/linux_sysvec.c Tue Jul 17 13:30:59 2001
> ***************
> *** 429,434 ****
> --- 429,441 ----
>
> bzero(&frame.sf_fpstate, sizeof(struct linux_fpstate));
>
> + /*
> + * Need to set the NXP Code Word to match what linux uses. This used
> + * to be in each linux binary, but more receintly, it was moved to
> + * the kernel and so we need to emulate that here.
> + */
> + frame.sf_fpstate.cw = __INITAL_LINUX_NPXCW__;
> +
> for (i = 0; i < (LINUX_NSIG_WORDS-1); i++)
> frame.sf_extramask[i] = lmask.__bits[i+1];
Er, this only sets it (strictly: schedules setting of it) in linux_sendsig().
I think it only works if the application catches a signal and returns fairly
normally form the signal handler. Then sigreturn() sets it.
You need to set it setregs() in an emulator-specific way. NetBSD sets it in
sysent-specific setregs() named sv_setregs.
Bruce
-------------------------------------------------------
--
--- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $
__o Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org
_'\<,_ Senior Systems Engineer, Walt Disney Feature Animation
(*)/ (*)
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?01071909352106.07804>
