From owner-freebsd-bugs Thu Jul 19 9:35:34 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mail.disney.com (mail.disney.com [204.128.192.15]) by hub.freebsd.org (Postfix) with ESMTP id AFD9037B403 for ; Thu, 19 Jul 2001 09:35:23 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f6JGYbI27109 for ; Thu, 19 Jul 2001 09:34:37 -0700 (PDT) Received: from [172.30.50.1] by pain.corp.disney.com with ESMTP for freebsd-bugs@freebsd.org; Thu, 19 Jul 2001 09:36:17 -0700 Received: from plio.fan.fa.disney.com (plio.fan.fa.disney.com [153.7.118.2]) by pecos.fa.disney.com (8.11.3/8.11.3) with ESMTP id f6JGZMs03906 for ; Thu, 19 Jul 2001 09:35:22 -0700 (PDT) Received: from mercury.fan.fa.disney.com (mercury.fan.fa.disney.com [153.7.119.1]) by plio.fan.fa.disney.com (8.9.2/8.9.2) with ESMTP id JAA02829 for ; Thu, 19 Jul 2001 09:35:21 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from snoopy.fan.fa.disney.com by mercury.fan.fa.disney.com for freebsd-bugs@freebsd.org; Thu, 19 Jul 2001 09:35:21 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Jim Pirzyk Organization: Walt Disney Feature Animation To: freebsd-bugs@freebsd.org Subject: Fwd: Re: kern/28966: math libraries in linux emulation do not returnsameresults Date: Thu, 19 Jul 2001 09:35:21 -0700 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01071909352106.07804@snoopy> Content-Transfer-Encoding: 8bit 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 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 To: Jim Pirzyk 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