From 70b6c4280f72a1adaa7cefc7ab7cc7173e3c8e7f Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 21 Mar 2012 22:43:44 +0100 Subject: [PATCH] Compile with /fp:precise instead of /fp:fast in release mode on Windows /fp:fast was introducing FP precision problems, and mixing it with some /fp:precise code caused strange game behaviors, DSI exceptions and freezes. This commit should fix most of the issues introduced by 3.0-73 (r95517a97). Thanks to hatarumoroboshi@hotmail.com for tracking a lot of these Win32 bugs. Fixes issue 4906. Fixes issue 5138. Probably fixes (not tested) issue 5067. --- .../PowerPC/Interpreter/Interpreter_FloatingPoint.cpp | 10 +--------- Source/VSProps/CodeGen_Release.props | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp index 3b0ae602cd..1d6ea2e70d 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp @@ -42,10 +42,6 @@ using namespace MathUtil; void UpdateSSEState(); -#ifdef _MSC_VER -#pragma float_control(precise, on, push) -#endif - // Extremely rare - actually, never seen. // Star Wars : Rogue Leader spams that at some point :| void Interpreter::Helper_UpdateCR1(double _fValue) @@ -518,8 +514,4 @@ void Interpreter::fsqrtx(UGeckoInstruction _inst) rPS0(_inst.FD) = sqrt(b); UpdateFPRF(rPS0(_inst.FD)); if (_inst.Rc) Helper_UpdateCR1(rPS0(_inst.FD)); -} - -#ifdef _MSC_VER -#pragma float_control(pop) -#endif +} \ No newline at end of file diff --git a/Source/VSProps/CodeGen_Release.props b/Source/VSProps/CodeGen_Release.props index 74770b6910..2dd392b7a9 100644 --- a/Source/VSProps/CodeGen_Release.props +++ b/Source/VSProps/CodeGen_Release.props @@ -19,7 +19,7 @@ false _SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) StreamingSIMDExtensions2 - Fast + Precise true