From 37ad2377b8781330d400985ce12a1ec61067a5e4 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 14 Mar 2007 21:31:50 +0000 Subject: [PATCH] * check x264_cpu_detect() before calling AltiVec functions. git-svn-id: svn://svn.videolan.org/x264/trunk@632 df754926-b1dd-0310-bc7b-ec298dee348c --- tools/checkasm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ) -- 2.47.3