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.
This commit is contained in:
Arun Raghavan 2012-10-29 14:40:00 +05:30
parent 2ec891d892
commit 654444eda9

View file

@ -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, 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_bool_t perf) {
PA_DECLARE_ALIGNED(8, float, f[SAMPLES]) = { 0 }; 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 } PA_CPU_TEST_RUN_STOP
} }
} }
#endif /* HAVE_NEON */
#endif /* defined (__arm__) && defined (__linux__) */
#if defined (__i386__) || defined (__amd64__) #if defined (__i386__) || defined (__amd64__)
START_TEST (sconv_sse_test) { START_TEST (sconv_sse_test) {
@ -329,6 +334,7 @@ END_TEST
#endif /* defined (__i386__) || defined (__amd64__) */ #endif /* defined (__i386__) || defined (__amd64__) */
#if defined (__arm__) && defined (__linux__) #if defined (__arm__) && defined (__linux__)
#ifdef HAVE_NEON
START_TEST (sconv_neon_test) { START_TEST (sconv_neon_test) {
pa_cpu_arm_flag_t flags = 0; pa_cpu_arm_flag_t flags = 0;
pa_convert_func_t orig_from_func, neon_from_func; 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); run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, TRUE, TRUE);
} }
END_TEST END_TEST
#endif /* HAVE_NEON */
#endif /* defined (__arm__) && defined (__linux__) */ #endif /* defined (__arm__) && defined (__linux__) */
#undef SAMPLES #undef SAMPLES