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

tterribe at svn.xiph.org tterribe at svn.xiph.org
Tue Apr 29 16:35:06 PDT 2008


Author: tterribe
Date: 2008-04-29 16:35:06 -0700 (Tue, 29 Apr 2008)
New Revision: 14815

Modified:
   trunk/theora/lib/cpu.c
Log:
Fix compile errors from r14814.
Also make sure we return an initialzed flags variable from all paths.


Modified: trunk/theora/lib/cpu.c
===================================================================
--- trunk/theora/lib/cpu.c	2008-04-29 16:54:37 UTC (rev 14814)
+++ trunk/theora/lib/cpu.c	2008-04-29 23:35:06 UTC (rev 14815)
@@ -90,8 +90,8 @@
     pushfd
     pop eax
     popfd
-    mov *_eax,eax
-    mov *_ebx,ebx
+    mov [_eax],eax
+    mov [_ebx],ebx
   }
 }
 # endif
@@ -121,7 +121,7 @@
    :"cc"
   );
 #  else
-  oc_cpuid_detect_helper(&eax,&ebx);
+  oc_detect_cpuid_helper(&eax,&ebx);
 #  endif
   /*No cpuid.*/
   if(eax==ebx)return 0;
@@ -158,7 +158,7 @@
     else{
       cpuid(0x80000001,eax,ebx,ecx,edx);
       /*If there isn't even MMX, give up.*/
-      if((edx&0x00800000)==0)return 0;
+      if(!(edx&0x00800000))return 0;
       flags=OC_CPU_X86_MMX;
       if(edx&0x80000000)flags|=OC_CPU_X86_3DNOW;
       if(edx&0x40000000)flags|=OC_CPU_X86_3DNOWEXT;
@@ -186,10 +186,10 @@
       /*The (non-Nehemiah) C3 processors support AMD-like cpuid info.*/
       /*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;
-      }
+      /*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{



More information about the commits mailing list