changeset 33625:5e3f013bf4c2

Run OS support for SSE check only for runtime CPU detection. It is pointless to run it otherwise and it causes issues on OSes where we have not implemented a way to check.
author reimar
date Wed, 22 Jun 2011 19:12:23 +0000
parents 16a8338ef734
children a621fd1e93ae
files cpudetect.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cpudetect.c	Wed Jun 22 19:02:20 2011 +0000
+++ b/cpudetect.c	Wed Jun 22 19:12:23 2011 +0000
@@ -52,6 +52,7 @@
  * team for SSE support detection and more cpu detect code.
  */
 
+#if CONFIG_RUNTIME_CPUDETECT
 /* I believe this code works.  However, it has only been used on a PII and PIII */
 
 #if defined(__linux__) && defined(_POSIX_SOURCE) && !ARCH_X86_64
@@ -221,6 +222,7 @@
     gCpuCaps.hasSSE=0;
 #endif /* __linux__ */
 }
+#endif
 
 
 // return TRUE if cpuid supported
@@ -352,6 +354,7 @@
            gCpuCaps.has3DNowExt);
 #endif
 
+#if CONFIG_RUNTIME_CPUDETECT
         /* FIXME: Does SSE2 need more OS support, too? */
         if (caps->hasSSE)
             check_os_katmai_support();
@@ -361,7 +364,7 @@
 //          caps->hasMMX2 = 0;
 //          caps->hasMMX = 0;
 
-#if !CONFIG_RUNTIME_CPUDETECT
+#else
 #if !HAVE_MMX
         if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n");
         caps->hasMMX=0;