Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return currently enabled, not disabled exceptions.
  • Loading branch information
Ulrich Drepper committed Aug 17, 2000
1 parent 3a93e25 commit 522554b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sysdeps/i386/fpu/fedisblxcpt.c
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion sysdeps/i386/fpu/feenablxcpt.c
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions 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.
Expand Down Expand Up @@ -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;
}

0 comments on commit 522554b

Please sign in to comment.