From: Sam Hocevar Date: Wed, 14 Mar 2007 21:31:50 +0000 (+0000) Subject: * check x264_cpu_detect() before calling AltiVec functions. X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=37ad2377b8781330d400985ce12a1ec61067a5e4;p=x264.git * check x264_cpu_detect() before calling AltiVec functions. git-svn-id: svn://svn.videolan.org/x264/trunk@632 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/tools/checkasm.c b/tools/checkasm.c index 988ff502..396f8b58 100644 --- a/tools/checkasm.c +++ b/tools/checkasm.c @@ -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 )