From 50843ff068aae5b1ff58581eddd3bd107e99114b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Feb 1995 05:47:15 +0000 Subject: Wed Feb 22 00:44:41 1995 Roland McGrath * 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. --- sysdeps/mach/hurd/i386/sigreturn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sysdeps/mach/hurd/i386/sigreturn.c') 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 -- cgit 1.4.1