]> granicus.if.org Git - libx264/commitdiff
* check x264_cpu_detect() before calling AltiVec functions.
authorSam Hocevar <sam@videolan.org>
Wed, 14 Mar 2007 21:31:50 +0000 (21:31 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 14 Mar 2007 21:31:50 +0000 (21:31 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@632 df754926-b1dd-0310-bc7b-ec298dee348c

tools/checkasm.c

index 988ff5022eea836c2b3b53a7e48aeee5d317084f..396f8b58f67ac6994aabc394a442323de2d01728 100644 (file)
@@ -780,8 +780,11 @@ int main(int argc, char *argv[])
     }
 #endif
 #elif ARCH_PPC
-    fprintf( stderr, "x264: ALTIVEC against C\n" );
-    ret = check_all( 0, X264_CPU_ALTIVEC );
+    if( x264_cpu_detect() & X264_CPU_ALTIVEC )
+    {
+        fprintf( stderr, "x264: ALTIVEC against C\n" );
+        ret = check_all( 0, X264_CPU_ALTIVEC );
+    }
 #endif
 
     if( ret == 0 )