diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bf5d30..37690a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -612,6 +612,7 @@ set(src_sys_dedicated sys/linux/dedicated.cpp) if (APPLE) set(src_sys_base + sys/cpu.cpp sys/threads.cpp sys/sys_local.cpp sys/posix/posix_net.cpp @@ -633,6 +634,7 @@ if (APPLE) ) elseif (WIN32) set(src_sys_base + sys/cpu.cpp sys/threads.cpp sys/sys_local.cpp sys/win32/win_cpu.cpp @@ -653,6 +655,7 @@ elseif (WIN32) ) else() set(src_sys_base + sys/cpu.cpp sys/threads.cpp sys/sys_local.cpp sys/posix/posix_net.cpp diff --git a/idlib/math/Simd.cpp b/idlib/math/Simd.cpp index b540e44..e0482bd 100644 --- a/idlib/math/Simd.cpp +++ b/idlib/math/Simd.cpp @@ -112,14 +112,9 @@ void idSIMD::InitProcessor( const char *module, bool forceGeneric ) { idLib::common->Printf( "%s using %s for SIMD processing\n", module, SIMDProcessor->GetName() ); } - if ( cpuid & CPUID_FTZ ) { + if ( cpuid & CPUID_SSE ) { idLib::sys->FPU_SetFTZ( true ); - idLib::common->Printf( "enabled Flush-To-Zero mode\n" ); - } - - if ( cpuid & CPUID_DAZ ) { idLib::sys->FPU_SetDAZ( true ); - idLib::common->Printf( "enabled Denormals-Are-Zero mode\n" ); } } diff --git a/sys/sys_public.h b/sys/sys_public.h index 17af79e..49ad389 100644 --- a/sys/sys_public.h +++ b/sys/sys_public.h @@ -39,8 +39,6 @@ typedef enum { CPUID_SSE2 = 0x00080, // Streaming SIMD Extensions 2 CPUID_SSE3 = 0x00100, // Streaming SIMD Extentions 3 aka Prescott's New Instructions CPUID_ALTIVEC = 0x00200, // AltiVec - CPUID_FTZ = 0x04000, // Flush-To-Zero mode (denormal results are flushed to zero) - CPUID_DAZ = 0x08000 // Denormals-Are-Zero mode (denormal source operands are set to zero) } cpuid_t; typedef enum { @@ -169,10 +167,10 @@ void Sys_FPU_SetPrecision( int precision ); // sets the FPU rounding mode void Sys_FPU_SetRounding( int rounding ); -// sets Flush-To-Zero mode (only available when CPUID_FTZ is set) +// sets Flush-To-Zero mode void Sys_FPU_SetFTZ( bool enable ); -// sets Denormals-Are-Zero mode (only available when CPUID_DAZ is set) +// sets Denormals-Are-Zero mode void Sys_FPU_SetDAZ( bool enable ); // returns amount of system ram