From 89bda900291968b4f6de5570d5dae31e9edee865 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 15 Dec 2018 21:44:39 +0000 Subject: [PATCH] Exclude exceptions not in FE_ALL_EXCEPT. Some buggy libms omit some FE_* from FE_ALL_EXCEPT, apparently, oops. When they cease to be relevant to me we can remove this. --- src/microcode/floenv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/microcode/floenv.c b/src/microcode/floenv.c index 8d29ad106..c9e08102e 100644 --- a/src/microcode/floenv.c +++ b/src/microcode/floenv.c @@ -360,35 +360,35 @@ arg_float_exceptions_to_trap (int n) DEFINE_PRIMITIVE ("FLOAT-INVALID-OPERATION-EXCEPTION", Prim_float_invalid_operation_exception, 0, 0, 0) #ifdef FE_INVALID - FLOAT_EXCEPTIONS_PRIMITIVE (FE_INVALID) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_INVALID & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif DEFINE_PRIMITIVE ("FLOAT-DIVIDE-BY-ZERO-EXCEPTION", Prim_float_divide_by_zero_exception, 0, 0, 0) #ifdef FE_DIVBYZERO - FLOAT_EXCEPTIONS_PRIMITIVE (FE_DIVBYZERO) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_DIVBYZERO & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif DEFINE_PRIMITIVE ("FLOAT-OVERFLOW-EXCEPTION", Prim_float_overflow_exception, 0, 0, 0) #ifdef FE_OVERFLOW - FLOAT_EXCEPTIONS_PRIMITIVE (FE_OVERFLOW) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_OVERFLOW & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif DEFINE_PRIMITIVE ("FLOAT-UNDERFLOW-EXCEPTION", Prim_float_underflow_exception, 0, 0, 0) #ifdef FE_UNDERFLOW - FLOAT_EXCEPTIONS_PRIMITIVE (FE_UNDERFLOW) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_UNDERFLOW & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif DEFINE_PRIMITIVE ("FLOAT-INEXACT-RESULT-EXCEPTION", Prim_float_inexact_result_exception, 0, 0, 0) #ifdef FE_INEXACT - FLOAT_EXCEPTIONS_PRIMITIVE (FE_INEXACT) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_INEXACT & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif @@ -397,7 +397,7 @@ DEFINE_PRIMITIVE ("FLOAT-INEXACT-RESULT-EXCEPTION", Prim_float_inexact_result_ex DEFINE_PRIMITIVE ("FLOAT-SUBNORMAL-OPERAND-EXCEPTION", Prim_float_subnormal_operand_exception, 0, 0, 0) #ifdef FE_DENORMAL - FLOAT_EXCEPTIONS_PRIMITIVE (FE_DENORMAL) + FLOAT_EXCEPTIONS_PRIMITIVE (FE_DENORMAL & FE_ALL_EXCEPT) #else UNIMPLEMENTED_FLOAT_EXCEPTIONS_PRIMITIVE () #endif -- 2.25.1