aboutsummaryrefslogtreecommitdiffstats
path: root/ref_vqshrun_n.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2015-01-20 16:04:24 +0100
committerChristophe Lyon <christophe.lyon@linaro.org>2015-01-20 16:04:24 +0100
commitc1cc7826d74587e0dc1c855810633a219b161ab3 (patch)
tree8aa68e368da3d9ebfa0a6c4feee1ca50c721dd2c /ref_vqshrun_n.c
parent4b5570c6f0b3f1465db686a09ad1b6356df2676e (diff)
downloadplatform_external_arm-neon-tests-c1cc7826d74587e0dc1c855810633a219b161ab3.tar.gz
platform_external_arm-neon-tests-c1cc7826d74587e0dc1c855810633a219b161ab3.tar.bz2
platform_external_arm-neon-tests-c1cc7826d74587e0dc1c855810633a219b161ab3.zip
__set_neon_cumulative_sat() modifies the contents on the QC flag, and
some intrinsics do so too: this patch adds the explicit dependency on the asm statement, to avoid code reordering or removal. When writing QC, the asm statement now has a fake input dependency, which is the output of the intrinsic being tested. Modifying the __set_neon_cumulative_sat macro is necessary, to be able to accept all the possible input types. Update the generic code in ref_v_binary_sat_op.c and ref_v_unary_sat_op.c accordingly, as well as all the tests involving QC.
Diffstat (limited to 'ref_vqshrun_n.c')
-rw-r--r--ref_vqshrun_n.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ref_vqshrun_n.c b/ref_vqshrun_n.c
index c2a2e15..871da96 100644
--- a/ref_vqshrun_n.c
+++ b/ref_vqshrun_n.c
@@ -40,15 +40,15 @@ THE SOFTWARE.
FNNAME (INSN)
{
/* Basic test: y=vqshrun_n(x,v), then store the result. */
-#define TEST_VQSHRUN_N2(INSN, T1, T2, W, W2, N, V) \
- Set_Neon_Cumulative_Sat(0); \
- VECT_VAR(vector_res, uint, W2, N) = \
- INSN##_##T2##W(VECT_VAR(vector, T1, W, N), \
- V); \
- vst1_u##W2(VECT_VAR(result, uint, W2, N), \
- VECT_VAR(vector_res, uint, W2, N)); \
- dump_neon_cumulative_sat(TEST_MSG, xSTR(INSN##_##T2##W), \
- xSTR(T1), W, N)
+#define TEST_VQSHRUN_N2(INSN, T1, T2, W, W2, N, V) \
+ Set_Neon_Cumulative_Sat(0, VECT_VAR(vector_res, uint, W2, N)); \
+ VECT_VAR(vector_res, uint, W2, N) = \
+ INSN##_##T2##W(VECT_VAR(vector, T1, W, N), \
+ V); \
+ vst1_u##W2(VECT_VAR(result, uint, W2, N), \
+ VECT_VAR(vector_res, uint, W2, N)); \
+ dump_neon_cumulative_sat(TEST_MSG, xSTR(INSN##_##T2##W), \
+ xSTR(T1), W, N)
/* Two auxliary macros are necessary to expand INSN */
#define TEST_VQSHRUN_N1(INSN, T1, T2, W, W2, N, V) \