diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/math-tests.h | 9 | ||||
-rw-r--r-- | sysdeps/powerpc/math-tests.h | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h index 9393229a36..974dda403a 100644 --- a/sysdeps/generic/math-tests.h +++ b/sysdeps/generic/math-tests.h @@ -87,3 +87,12 @@ # define EXCEPTION_ENABLE_SUPPORTED(EXCEPT) \ (EXCEPTION_TESTS_float || EXCEPTION_TESTS_double) #endif + +/* Indicate whether exception traps, if enabled, occur whenever an + exception flag is set explicitly, so it is not possible to set flag + bits with traps enabled without causing traps to be taken. If + traps cannot be enabled, the value of this macro does not + matter. */ +#ifndef EXCEPTION_SET_FORCES_TRAP +# define EXCEPTION_SET_FORCES_TRAP 0 +#endif diff --git a/sysdeps/powerpc/math-tests.h b/sysdeps/powerpc/math-tests.h index 31042fa5b6..426a02717d 100644 --- a/sysdeps/powerpc/math-tests.h +++ b/sysdeps/powerpc/math-tests.h @@ -24,4 +24,10 @@ <http://gcc.gnu.org/PR56828>. */ #define SNAN_TESTS_TYPE_CAST 0 +#ifndef __NO_FPRS__ +/* Setting exception flags in FPSCR results in enabled traps for those + exceptions being taken. */ +# define EXCEPTION_SET_FORCES_TRAP 1 +#endif + #include_next <math-tests.h> |