From f439b81e1a18bcc2fcd0755d2da6dc737f42cf8c Mon Sep 17 00:00:00 2001 From: janwas Date: Sun, 6 Nov 2005 03:37:05 +0000 Subject: [PATCH] add -ffast-math and comment on that and /QIfist This was SVN commit r3102. --- build/premake/premake.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/premake/premake.lua b/build/premake/premake.lua index 1a9dd37005..a56636c778 100755 --- a/build/premake/premake.lua +++ b/build/premake/premake.lua @@ -225,6 +225,8 @@ function setuppackage_engine (projectname) package.pchHeader = "precompiled.h" package.pchSource = "precompiled.cpp" + -- float->int conversion uses IA32 FISTP instruction instead of _ftol2 (slow!) + -- since we also change FPU rounding mode, this should be safe tinsert(package.buildoptions, { "/QIfist" }) else -- Non-Windows, = Unix @@ -257,6 +259,10 @@ function setuppackage_engine (projectname) "CONFIG_USE_MMGR" } -- Includes tinsert(package.includepaths, { "/usr/X11R6/include/X11" } ) + + -- speed up math functions by inlining. warning: this may result in + -- non-IEEE-conformant results, but haven't noticed any trouble so far. + tinsert(package.buildoptions, { "-ffast-math" }) end end