mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 14:40:06 +00:00
Return currently enabled, not disabled exceptions.
This commit is contained in:
parent
3a93e25218
commit
522554b159
@ -28,7 +28,7 @@ fedisableexcept (int excepts)
|
|||||||
/* Get the current control word. */
|
/* Get the current control word. */
|
||||||
__asm__ ("fstcw %0" : "=m" (*&new_exc));
|
__asm__ ("fstcw %0" : "=m" (*&new_exc));
|
||||||
|
|
||||||
old_exc = new_exc & FE_ALL_EXCEPT;
|
old_exc = (~new_exc) & FE_ALL_EXCEPT;
|
||||||
|
|
||||||
excepts &= FE_ALL_EXCEPT;
|
excepts &= FE_ALL_EXCEPT;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ feenableexcept (int excepts)
|
|||||||
__asm__ ("fstcw %0" : "=m" (*&new_exc));
|
__asm__ ("fstcw %0" : "=m" (*&new_exc));
|
||||||
|
|
||||||
excepts &= FE_ALL_EXCEPT;
|
excepts &= FE_ALL_EXCEPT;
|
||||||
old_exc = new_exc & FE_ALL_EXCEPT;
|
old_exc = (~new_exc) & FE_ALL_EXCEPT;
|
||||||
|
|
||||||
new_exc &= ~excepts;
|
new_exc &= ~excepts;
|
||||||
__asm__ ("fldcw %0" : : "m" (*&new_exc));
|
__asm__ ("fldcw %0" : : "m" (*&new_exc));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Get enabled floating-point exceptions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
|
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
|
||||||
|
|
||||||
@ -28,5 +28,5 @@ fegetexcept (void)
|
|||||||
/* Get the current control word. */
|
/* Get the current control word. */
|
||||||
__asm__ ("fstcw %0" : "=m" (*&exc));
|
__asm__ ("fstcw %0" : "=m" (*&exc));
|
||||||
|
|
||||||
return exc & FE_ALL_EXCEPT;
|
return (~exc) & FE_ALL_EXCEPT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user