diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2014-07-11 16:44:32 +0200 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2014-07-11 16:44:32 +0200 |
commit | d9ab3e311117278ef2882655d728fbaef58fb8bf (patch) | |
tree | 5770ca80e4c00e80d0ed2a89bafce9bb45482278 /stm-arm-neon-ref.h | |
parent | 4de1f51e748368b32b65930f44756197ad8dd1d1 (diff) | |
download | platform_external_arm-neon-tests-d9ab3e311117278ef2882655d728fbaef58fb8bf.tar.gz platform_external_arm-neon-tests-d9ab3e311117278ef2882655d728fbaef58fb8bf.tar.bz2 platform_external_arm-neon-tests-d9ab3e311117278ef2882655d728fbaef58fb8bf.zip |
Make sure poly* types are handled as unsigned when they get printed.
Diffstat (limited to 'stm-arm-neon-ref.h')
-rw-r--r-- | stm-arm-neon-ref.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/stm-arm-neon-ref.h b/stm-arm-neon-ref.h index debffb6..1500905 100644 --- a/stm-arm-neon-ref.h +++ b/stm-arm-neon-ref.h @@ -85,6 +85,18 @@ static int result_idx = 0; fprintf(ref_file, " }\n"); \ DUMP4GCC(MSG,T,W,N,FMT); +/* Use casts for remove sign bits */ +#define DUMP_POLY(MSG,T,W,N,FMT) \ + fprintf(ref_file, "%s:%d:%s [] = { ", MSG, result_idx++, \ + STR(VECT_VAR(result, T, W, N))); \ + for(i=0; i<N ; i++) \ + { \ + fprintf(ref_file, "%" FMT ", ", \ + (uint##W##_t)VECT_VAR(result, T, W, N)[i]); \ + } \ + fprintf(ref_file, " }\n"); \ + DUMP4GCC(MSG,T,W,N,FMT); + #define DUMP_FP(MSG,T,W,N,FMT) \ fprintf(ref_file, "%s:%d:%s [] = { ", MSG, result_idx++, \ STR(VECT_VAR(result, T, W, N))); \ @@ -450,8 +462,8 @@ static void dump_results (char *test_name) DUMP(test_name, uint, 16, 4, PRIu16); DUMP(test_name, uint, 32, 2, PRIu32); DUMP(test_name, uint, 64, 1, PRIu64); - DUMP(test_name, poly, 8, 8, PRIu8); - DUMP(test_name, poly, 16, 4, PRIu16); + DUMP_POLY(test_name, poly, 8, 8, PRIu8); + DUMP_POLY(test_name, poly, 16, 4, PRIu16); DUMP_FP(test_name, float, 32, 2, PRIx32); #if __ARM_NEON_FP16_INTRINSICS DUMP_FP16(test_name, float, 16, 4, PRIu16); @@ -465,8 +477,8 @@ static void dump_results (char *test_name) DUMP(test_name, uint, 16, 8, PRIu16); DUMP(test_name, uint, 32, 4, PRIu32); DUMP(test_name, uint, 64, 2, PRIu64); - DUMP(test_name, poly, 8, 16, PRIu8); - DUMP(test_name, poly, 16, 8, PRIu16); + DUMP_POLY(test_name, poly, 8, 16, PRIu8); + DUMP_POLY(test_name, poly, 16, 8, PRIu16); DUMP_FP(test_name, float, 32, 4, PRIx32); #if __ARM_NEON_FP16_INTRINSICS DUMP_FP16(test_name, float, 16, 8, PRIu16); @@ -489,8 +501,8 @@ static void dump_results_hex2 (const char *test_name, const char* comment) DUMP(test_name, uint, 16, 4, PRIx16); DUMP(test_name, uint, 32, 2, PRIx32); DUMP(test_name, uint, 64, 1, PRIx64); - DUMP(test_name, poly, 8, 8, PRIx8); - DUMP(test_name, poly, 16, 4, PRIx16); + DUMP_POLY(test_name, poly, 8, 8, PRIx8); + DUMP_POLY(test_name, poly, 16, 4, PRIx16); DUMP_FP(test_name, float, 32, 2, PRIx32); #if __ARM_NEON_FP16_INTRINSICS DUMP_FP16(test_name, float, 16, 4, PRIx16); @@ -504,8 +516,8 @@ static void dump_results_hex2 (const char *test_name, const char* comment) DUMP(test_name, uint, 16, 8, PRIx16); DUMP(test_name, uint, 32, 4, PRIx32); DUMP(test_name, uint, 64, 2, PRIx64); - DUMP(test_name, poly, 8, 16, PRIx8); - DUMP(test_name, poly, 16, 8, PRIx16); + DUMP_POLY(test_name, poly, 8, 16, PRIx8); + DUMP_POLY(test_name, poly, 16, 8, PRIx16); DUMP_FP(test_name, float, 32, 4, PRIx32); #if __ARM_NEON_FP16_INTRINSICS DUMP_FP16(test_name, float, 16, 8, PRIx16); |