From 22c472bb171049c2aadd6156ef4e18005271e06b Mon Sep 17 00:00:00 2001 From: david Date: Sat, 22 Dec 2001 23:16:43 +0000 Subject: [PATCH] Corrected typo in macro name, and reverse flags -- FPEs really are being reported now. --- src/Main/main.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index d835bbd48..a777195c1 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -25,7 +25,7 @@ # include #endif -#if defined(__linux__) && defined(__386__) +#if defined(__linux__) && defined(__i386__) # include #endif @@ -1774,14 +1774,15 @@ int mainLoop( int argc, char **argv ) { int main ( int argc, char **argv ) { // Enable floating-point exceptions for Linux/x86 -#if defined(__linux__) && defined(__386__) - int fpe_flags = 0; -// fpe_flags |= _FPU_MASK_IM; // invalid operation -// fpe_flags |= _FPU_MASK_DM; // denormalized operand - fpe_flags |= _FPU_MASK_ZM; // zero-divide -// fpe_flags |= _FPU_MASK_OM; // overflow -// fpe_flags |= _FPU_MASK_UM; // underflow -// fpe_flags |= _FPU_MASK_PM; // precision (inexact result) +#if defined(__linux__) && defined(__i386__) + fpu_control_t fpe_flags; + _FPU_GETCW(fpe_flags); +// fpe_flags &= ~_FPU_MASK_IM; // invalid operation +// fpe_flags &= ~_FPU_MASK_DM; // denormalized operand + fpe_flags &= ~_FPU_MASK_ZM; // zero-divide +// fpe_flags &= ~_FPU_MASK_OM; // overflow +// fpe_flags &= ~_FPU_MASK_UM; // underflow +// fpe_flags &= ~_FPU_MASK_PM; // precision (inexact result) _FPU_SETCW(fpe_flags); #endif -- 2.39.5