From owner-cvs-all Fri Nov 12 9: 6:17 1999 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 0D27F14CAE; Fri, 12 Nov 1999 09:06:00 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from p61-ts5.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id EAA29155; Sat, 13 Nov 1999 04:12:06 +1100 Date: Sat, 13 Nov 1999 04:05:46 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Nate Williams Cc: Marcel Moolenaar , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/include signal.h In-Reply-To: <199911121632.JAA19116@mt.sri.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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(). 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". Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message