about summary refs log tree commit diff
path: root/sysdeps/i386/fpu/fedisblxcpt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-16 02:36:25 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-16 02:36:25 +0000
commitad04a62fbebe86aae6189a641ef0816b2de2b84e (patch)
treebccc780e28bed836fda7aeefc4f9ccb28000b642 /sysdeps/i386/fpu/fedisblxcpt.c
parent9df7693376a16642a8e11869fffbd7a853f2b6a0 (diff)
downloadglibc-ad04a62fbebe86aae6189a641ef0816b2de2b84e.tar.gz
glibc-ad04a62fbebe86aae6189a641ef0816b2de2b84e.tar.xz
glibc-ad04a62fbebe86aae6189a641ef0816b2de2b84e.zip
(fedisableexcept): Mask, not unmask, exceptions.
Diffstat (limited to 'sysdeps/i386/fpu/fedisblxcpt.c')
-rw-r--r--sysdeps/i386/fpu/fedisblxcpt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c
index 0cb570f562..019366e1c8 100644
--- a/sysdeps/i386/fpu/fedisblxcpt.c
+++ b/sysdeps/i386/fpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
 /* Disable floating-point exceptions.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999.
 
@@ -24,15 +24,15 @@ int
 fedisableexcept (int excepts)
 {
   unsigned short int new_exc, old_exc;
-  
+
   /* Get the current control word.  */
   __asm__ ("fstcw %0" : "=m" (*&new_exc));
-  
+
   old_exc = new_exc & FE_ALL_EXCEPT;
 
   excepts &= FE_ALL_EXCEPT;
-  
-  new_exc &= ~excepts;
+
+  new_exc |= excepts;
   __asm__ ("fldcw %0" : : "m" (*&new_exc));
 
   return old_exc;