about summary refs log tree commit diff
path: root/sysdeps/mach/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-02-22 05:47:15 +0000
committerRoland McGrath <roland@gnu.org>1995-02-22 05:47:15 +0000
commit50843ff068aae5b1ff58581eddd3bd107e99114b (patch)
tree0c72d59f78d63861d4a901fafd90cf6c3c822193 /sysdeps/mach/hurd
parent23ad311df0e01caa58b54afb8ae999a3ffc1ba7a (diff)
downloadglibc-50843ff068aae5b1ff58581eddd3bd107e99114b.tar.gz
glibc-50843ff068aae5b1ff58581eddd3bd107e99114b.tar.xz
glibc-50843ff068aae5b1ff58581eddd3bd107e99114b.zip
Wed Feb 22 00:44:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
	* sysdeps/mach/hurd/i386/sigreturn.c: Restore the FPU state.

	* stdlib/random.c (__srandom): Change algorithm used to populate
 	the state array.
	(randtbl): Recomputed with new algorithm.
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r--sysdeps/mach/hurd/i386/sigreturn.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
index df8960669f..19ba1d472c 100644
--- a/sysdeps/mach/hurd/i386/sigreturn.c
+++ b/sysdeps/mach/hurd/i386/sigreturn.c
@@ -80,10 +80,9 @@ __sigreturn (struct sigcontext *scp)
   *reply_port = scp->sc_reply_port;
 
   if (scp->sc_fpused)
-    {
-  /* XXX should restore FPU state here XXX roland needs 387 manual */
-  /*    abort (); */
-    }
+    /* Restore the FPU state.  Mach conveniently stores the state
+       in the format the i387 `frstor' instruction uses to restore it.  */
+    asm volatile ("frstor %0" : : "m" (scp->sc_fpsave));
 
   {
     /* There are convenient instructions to pop state off the stack, so we