From owner-cvs-all Fri Nov 12 9:11:22 1999 Delivered-To: cvs-all@freebsd.org Received: from ns.mt.sri.com (ns.mt.sri.com [206.127.79.91]) by hub.freebsd.org (Postfix) with ESMTP id ECEFE15029; Fri, 12 Nov 1999 09:11:09 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.9.3/8.9.3) with SMTP id KAA13499; Fri, 12 Nov 1999 10:11:06 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id KAA19367; Fri, 12 Nov 1999 10:11:04 -0700 Date: Fri, 12 Nov 1999 10:11:04 -0700 Message-Id: <199911121711.KAA19367@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Bruce Evans Cc: Nate Williams , Marcel Moolenaar , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/include signal.h In-Reply-To: References: <199911121632.JAA19116@mt.sri.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@mt.sri.com (Nate Williams) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > > > Our setjmp/longjmp already preserve too much FPU state C9x draft > > > compatibility. > > > > >From the comments in the JDK source I added. > > > > + } else { \ > > + /* \ > > + * FreeBSD's siglongjmp resets the FPU with 'fninit', \ > > + * so restore it. \ > > + */ \ > > + __asm__ ("frstor %0"::"m" (*fdata)); \ > > > > By reseting the FPU with fninit, we *lose* much of the state, we in our > > code we must restore the state (which we stored before the call to > > sigsetjmp with fsave/fwait). > > fninit lose some current state, but nothing related to the state at the > time of the sigsetjmp(). JDK apparently needs to restore the state at > the time of the setjmp(). Right. What else would you restore if not the state at the time of the setjmp? > The comment seems to be misleading. It > should probably say "FreeBSD's siglongjmp() doesn't restore the FPU to > its state at the time of the sigsetjmp(), so we restore it here". What other state would you restore if not the state at the time of the sigsetjmp? Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message