1
0
forked from 0ad/0ad

Do not mess with FPU rounding control on Linux.

It significantly affects at least the software lighting calculations.

This was SVN commit r3103.
This commit is contained in:
prefect 2005-11-06 03:54:58 +00:00
parent f439b81e1a
commit 1a0744c9db

View File

@ -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();