From 24176967122b027e51e437ace3b9afdf841fed9d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Jun 2003 09:02:16 +0000 Subject: Update. 2003-05-19 Ed Connell * sysdeps/unix/sysv/linux/i386/getcontext.S (getcontext): Retain floating point mask. * sysdeps/i386/fpu/fegetenv.c (fegetenv): Likewise. --- sysdeps/i386/fpu/fegetenv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysdeps/i386/fpu/fegetenv.c') diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c index 5eef171308..fb955cf565 100644 --- a/sysdeps/i386/fpu/fegetenv.c +++ b/sysdeps/i386/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1997,1999,2000,2001,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -25,6 +25,10 @@ int __fegetenv (fenv_t *envp) { __asm__ ("fnstenv %0" : "=m" (*envp)); + /* And load it right back since the processor changes the mask. + Intel thought this opcode to be used in interrupt handlers which + would block all exceptions. */ + __asm__ ("fldenv %0" : : "m" (*envp)); /* Success. */ return 0; -- cgit 1.4.1