[xiph-commits] r14834 - trunk/theora/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Sun May 4 07:03:22 PDT 2008


Author: tterribe
Date: 2008-05-04 07:03:21 -0700 (Sun, 04 May 2008)
New Revision: 14834

Modified:
   trunk/theora/lib/cpu.c
Log:
We still need to do an AMD-style check for VIA processors even if the
 Intel-style one succeeds in order to pick up 3dnow! support.
Thanks to David Kuehling for pointing out the error.


Modified: trunk/theora/lib/cpu.c
===================================================================
--- trunk/theora/lib/cpu.c	2008-05-04 00:47:00 UTC (rev 14833)
+++ trunk/theora/lib/cpu.c	2008-05-04 14:03:21 UTC (rev 14834)
@@ -182,15 +182,14 @@
       if(edx&0x04000000)flags|=OC_CPU_X86_SSE2;
       if(ecx&0x00000001)flags|=OC_CPU_X86_PNI;
     }
-    else{
-      /*The (non-Nehemiah) C3 processors support AMD-like cpuid info.*/
-      /*How about earlier chips?*/
-      cpuid(0x80000001,eax,ebx,ecx,edx);
-      /*If there isn't even MMX, give up.*/
-      if(!(edx&0x00800000))return 0;
-      flags=OC_CPU_X86_MMX;
-      if(edx&0x80000000)flags|=OC_CPU_X86_3DNOW;
-    }
+    else flags=0;
+    /*The (non-Nehemiah) C3 processors support AMD-like cpuid info.
+      We need to check this even if the Intel test succeeds to pick up 3dnow!
+       support on these processors.*/
+    /*TODO: How about earlier chips?*/
+    cpuid(0x80000001,eax,ebx,ecx,edx);
+    if(edx&0x00800000)flags|=OC_CPU_X86_MMX;
+    if(edx&0x80000000)flags|=OC_CPU_X86_3DNOW;
   }
   else{
     /*Implement me.*/



More information about the commits mailing list