Date: Sat, 13 Nov 1999 04:05:46 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Nate Williams <nate@mt.sri.com> Cc: Marcel Moolenaar <marcel@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/include signal.h Message-ID: <Pine.BSF.4.10.9911130359010.18310-100000@alphplex.bde.org> In-Reply-To: <199911121632.JAA19116@mt.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911130359010.18310-100000>