mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-04 02:55:50 +03:00
Removed FPU flags changing for SSE builds
This commit is contained in:
parent
085c8b8017
commit
dace70e2b1
@ -212,15 +212,18 @@ enginefuncs_t g_engfuncsExportedToDlls;
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void Sys_SetupFPUOptions()
|
void Sys_SetupFPUOptions()
|
||||||
{
|
{
|
||||||
|
#ifndef __SSE__
|
||||||
static uint8 fpuOpts[32];
|
static uint8 fpuOpts[32];
|
||||||
|
|
||||||
__asm { fnstenv byte ptr fpuOpts }
|
__asm { fnstenv byte ptr fpuOpts }
|
||||||
fpuOpts[0] |= 0x3Fu;
|
fpuOpts[0] |= 0x3Fu;
|
||||||
__asm { fldenv byte ptr fpuOpts }
|
__asm { fldenv byte ptr fpuOpts }
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
NOINLINE void Sys_InitFPUControlWords()
|
void Sys_InitFPUControlWords()
|
||||||
{
|
{
|
||||||
|
#ifndef __SSE__
|
||||||
int fpucw = 0;
|
int fpucw = 0;
|
||||||
__asm { fnstcw fpucw }
|
__asm { fnstcw fpucw }
|
||||||
|
|
||||||
@ -228,9 +231,10 @@ NOINLINE void Sys_InitFPUControlWords()
|
|||||||
g_FPUCW_Mask_Prec_64Bit_2 = (fpucw & 0xF0FF) | 0x300;
|
g_FPUCW_Mask_Prec_64Bit_2 = (fpucw & 0xF0FF) | 0x300;
|
||||||
g_FPUCW_Mask_Round_Trunc = (fpucw & 0xF0FF) | 0xC00;
|
g_FPUCW_Mask_Round_Trunc = (fpucw & 0xF0FF) | 0xC00;
|
||||||
g_FPUCW_Mask_Round_Up = (fpucw & 0xF0FF) | 0x800;
|
g_FPUCW_Mask_Round_Up = (fpucw & 0xF0FF) | 0x800;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl Sys_SetStartTime()
|
void Sys_SetStartTime()
|
||||||
{
|
{
|
||||||
int startTimeArg;
|
int startTimeArg;
|
||||||
|
|
||||||
@ -277,15 +281,19 @@ void __cdecl Sys_InitHardwareTimer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int g_SavedFPUCW1 = 0;
|
int g_SavedFPUCW1 = 0;
|
||||||
NOINLINE void Sys_FPUCW_Push_Prec64() {
|
void Sys_FPUCW_Push_Prec64() {
|
||||||
|
#ifndef __SSE__
|
||||||
uint16 tmp = g_FPUCW_Mask_Prec_64Bit;
|
uint16 tmp = g_FPUCW_Mask_Prec_64Bit;
|
||||||
__asm { fnstcw g_SavedFPUCW1 }
|
__asm { fnstcw g_SavedFPUCW1 }
|
||||||
__asm { fldcw tmp }
|
__asm { fldcw tmp }
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
NOINLINE void Sys_FPUCW_Pop_Prec64() {
|
void Sys_FPUCW_Pop_Prec64() {
|
||||||
|
#ifndef __SSE__
|
||||||
uint16 tmp = g_SavedFPUCW1;
|
uint16 tmp = g_SavedFPUCW1;
|
||||||
__asm { fldcw tmp }
|
__asm { fldcw tmp }
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user