Corrected typo in macro name, and reverse flags -- FPEs really are
being reported now.
This commit is contained in:
parent
c24f4a0539
commit
22c472bb17
1 changed files with 10 additions and 9 deletions
|
@ -25,7 +25,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) && defined(__386__)
|
#if defined(__linux__) && defined(__i386__)
|
||||||
# include <fpu_control.h>
|
# include <fpu_control.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1774,14 +1774,15 @@ int mainLoop( int argc, char **argv ) {
|
||||||
int main ( int argc, char **argv ) {
|
int main ( int argc, char **argv ) {
|
||||||
|
|
||||||
// Enable floating-point exceptions for Linux/x86
|
// Enable floating-point exceptions for Linux/x86
|
||||||
#if defined(__linux__) && defined(__386__)
|
#if defined(__linux__) && defined(__i386__)
|
||||||
int fpe_flags = 0;
|
fpu_control_t fpe_flags;
|
||||||
// fpe_flags |= _FPU_MASK_IM; // invalid operation
|
_FPU_GETCW(fpe_flags);
|
||||||
// fpe_flags |= _FPU_MASK_DM; // denormalized operand
|
// fpe_flags &= ~_FPU_MASK_IM; // invalid operation
|
||||||
fpe_flags |= _FPU_MASK_ZM; // zero-divide
|
// fpe_flags &= ~_FPU_MASK_DM; // denormalized operand
|
||||||
// fpe_flags |= _FPU_MASK_OM; // overflow
|
fpe_flags &= ~_FPU_MASK_ZM; // zero-divide
|
||||||
// fpe_flags |= _FPU_MASK_UM; // underflow
|
// fpe_flags &= ~_FPU_MASK_OM; // overflow
|
||||||
// fpe_flags |= _FPU_MASK_PM; // precision (inexact result)
|
// fpe_flags &= ~_FPU_MASK_UM; // underflow
|
||||||
|
// fpe_flags &= ~_FPU_MASK_PM; // precision (inexact result)
|
||||||
_FPU_SETCW(fpe_flags);
|
_FPU_SETCW(fpe_flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue