From 654444eda9e57cd8a9326f6ad0e6aeb354e9b83d Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 29 Oct 2012 14:40:00 +0530 Subject: [PATCH] tests: Minor cpu-test fixes for non-NEON builds The s16->float test is only run on ARM with NEOn at the moment, so we don't define that code in other cases. --- src/tests/cpu-test.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c index f3308d9..e38e632 100644 --- a/src/tests/cpu-test.c +++ b/src/tests/cpu-test.c @@ -255,6 +255,9 @@ static void run_conv_test_float_to_s16(pa_convert_func_t func, pa_convert_func_t } } +/* This test is currently only run under NEON */ +#if defined (__arm__) && defined (__linux__) +#ifdef HAVE_NEON static void run_conv_test_s16_to_float(pa_convert_func_t func, pa_convert_func_t orig_func, int align, pa_bool_t correct, pa_bool_t perf) { PA_DECLARE_ALIGNED(8, float, f[SAMPLES]) = { 0 }; @@ -298,6 +301,8 @@ static void run_conv_test_s16_to_float(pa_convert_func_t func, pa_convert_func_t } PA_CPU_TEST_RUN_STOP } } +#endif /* HAVE_NEON */ +#endif /* defined (__arm__) && defined (__linux__) */ #if defined (__i386__) || defined (__amd64__) START_TEST (sconv_sse_test) { @@ -329,6 +334,7 @@ END_TEST #endif /* defined (__i386__) || defined (__amd64__) */ #if defined (__arm__) && defined (__linux__) +#ifdef HAVE_NEON START_TEST (sconv_neon_test) { pa_cpu_arm_flag_t flags = 0; pa_convert_func_t orig_from_func, neon_from_func; @@ -368,6 +374,7 @@ START_TEST (sconv_neon_test) { run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, TRUE, TRUE); } END_TEST +#endif /* HAVE_NEON */ #endif /* defined (__arm__) && defined (__linux__) */ #undef SAMPLES -- 2.7.4