- workaround MSVC 2015 code generation issue, x64 only

With optimization turned on illegal instructions were generated for turbo CVAR handler function

https://forum.zdoom.org/viewtopic.php?t=63157
This commit is contained in:
alexey.lysiuk 2019-01-18 12:07:13 +02:00 committed by drfrag
parent ea688fc613
commit 583e1103a0

View file

@ -245,6 +245,12 @@ EXTERN_CVAR (Int, team)
CVAR (Bool, teamplay, false, CVAR_SERVERINFO)
// Workaround for x64 code generation bug in MSVC 2015
// Optimized targets contain illegal instructions in the function below
#if defined _M_X64 && _MSC_VER < 1910
#pragma optimize("", off)
#endif // _M_X64 && _MSC_VER < 1910
// [RH] Allow turbo setting anytime during game
CUSTOM_CVAR (Float, turbo, 100.f, CVAR_NOINITCALL)
{
@ -267,6 +273,10 @@ CUSTOM_CVAR (Float, turbo, 100.f, CVAR_NOINITCALL)
}
}
#if defined _M_X64 && _MSC_VER < 1910
#pragma optimize("", on)
#endif // _M_X64 && _MSC_VER < 1910
CCMD (turnspeeds)
{
if (argv.argc() == 1)