diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-17 18:43:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-17 18:43:01 +0000 |
commit | 522554b15962927f372e4bf60e72ea7e0ae0b71f (patch) | |
tree | 7ce3cba2bab67b8486b8948140f764a0aaaf2dcf | |
parent | 3a93e252185f933d7e9faceeec1eb5de79b9466f (diff) | |
download | glibc-522554b15962927f372e4bf60e72ea7e0ae0b71f.tar glibc-522554b15962927f372e4bf60e72ea7e0ae0b71f.tar.gz glibc-522554b15962927f372e4bf60e72ea7e0ae0b71f.tar.bz2 glibc-522554b15962927f372e4bf60e72ea7e0ae0b71f.zip |
Return currently enabled, not disabled exceptions.
-rw-r--r-- | sysdeps/i386/fpu/fedisblxcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/i386/fpu/feenablxcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/i386/fpu/fegetexcept.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c index 019366e1c8..00c04cba05 100644 --- a/sysdeps/i386/fpu/fedisblxcpt.c +++ b/sysdeps/i386/fpu/fedisblxcpt.c @@ -28,7 +28,7 @@ fedisableexcept (int excepts) /* Get the current control word. */ __asm__ ("fstcw %0" : "=m" (*&new_exc)); - old_exc = new_exc & FE_ALL_EXCEPT; + old_exc = (~new_exc) & FE_ALL_EXCEPT; excepts &= FE_ALL_EXCEPT; diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c index f284306c4e..303e429884 100644 --- a/sysdeps/i386/fpu/feenablxcpt.c +++ b/sysdeps/i386/fpu/feenablxcpt.c @@ -29,7 +29,7 @@ feenableexcept (int excepts) __asm__ ("fstcw %0" : "=m" (*&new_exc)); excepts &= FE_ALL_EXCEPT; - old_exc = new_exc & FE_ALL_EXCEPT; + old_exc = (~new_exc) & FE_ALL_EXCEPT; new_exc &= ~excepts; __asm__ ("fldcw %0" : : "m" (*&new_exc)); diff --git a/sysdeps/i386/fpu/fegetexcept.c b/sysdeps/i386/fpu/fegetexcept.c index 310a717d97..615b4677ab 100644 --- a/sysdeps/i386/fpu/fegetexcept.c +++ b/sysdeps/i386/fpu/fegetexcept.c @@ -1,5 +1,5 @@ /* Get enabled 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. @@ -28,5 +28,5 @@ fegetexcept (void) /* Get the current control word. */ __asm__ ("fstcw %0" : "=m" (*&exc)); - return exc & FE_ALL_EXCEPT; + return (~exc) & FE_ALL_EXCEPT; } |