From a020e088d26b885222aca754c3814a48ed922e40 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 1 Nov 2010 06:56:06 +0000 Subject: [PATCH] More fixes to floenv.h. --- src/microcode/floenv.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/microcode/floenv.h b/src/microcode/floenv.h index 52468db24..40358f137 100644 --- a/src/microcode/floenv.h +++ b/src/microcode/floenv.h @@ -94,6 +94,11 @@ USA. # define FE_INEXACT FP_X_IMP # endif +# ifndef FE_ALL_EXCEPT +# define FE_ALL_EXCEPT \ + (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) +# endif + /* FP_X_IOV? */ # ifndef HAVE_FEXCEPT_T @@ -117,7 +122,7 @@ typedef fp_except fexcept_t; /* This isn't right -- it doesn't necessarily actually raise the exception until some floating-point operation is performed. */ # define feraiseexcept(excepts) \ - ((fpsetsticky ((fpgetsticky ()) || (FE_ALL_EXCEPT & (excepts)))), 0) + ((fpsetsticky ((fpgetsticky ()) | (FE_ALL_EXCEPT & (excepts)))), 0) # endif # ifndef HAVE_FEGETEXCEPTFLAG @@ -142,7 +147,7 @@ typedef fp_except fexcept_t; # ifndef HAVE_FEENABLEEXCEPT # define HAVE_FEENABLEEXCEPT # define feenableexcept(excepts) \ - (fpsetmask ((fpgetmask ()) || (FE_ALL_EXCEPT & (excepts)))) + (fpsetmask ((fpgetmask ()) | (FE_ALL_EXCEPT & (excepts)))) # endif # ifndef HAVE_FEDISABLEEXCEPT -- 2.25.1