diff --git a/source/lib/detect.cpp b/source/lib/detect.cpp index 5ed506ba54..265ed03a26 100755 --- a/source/lib/detect.cpp +++ b/source/lib/detect.cpp @@ -165,10 +165,16 @@ void cpu_init() // note: passing a flag *disables* that exception. _control87(_EM_INVALID|_EM_DENORMAL|_EM_OVERFLOW|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); +#if OS_WIN + // On Windows: // round toward zero (truncate). this is what ANSI C calls for; // if we set it to this (default is round to nearest), the compiler can // generate FISTP (much faster) instead of _ftol2 with the same results. + // + // Don't do this anywhere else unless the implications have been fully + // investigated. _control87(_RC_CHOP, _MCW_RC); +#endif // If possible, hook up capability-sensitive assembler routines ia32_hook_capabilities();