aboutsummaryrefslogtreecommitdiffstats
path: root/ref_vqrshl.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2011-09-26 18:00:27 +0200
committerChristophe Lyon <christophe.lyon@st.com>2011-09-26 18:00:27 +0200
commitc8aa0f690d4febd69842708d468673b7f2c99c25 (patch)
treed032a0de6dd6b5472d4e0280861903fc5369ca14 /ref_vqrshl.c
parentae97a862ad03f118f56e9b4d099f1fcf1d50c541 (diff)
downloadplatform_external_arm-neon-tests-c8aa0f690d4febd69842708d468673b7f2c99c25.tar.gz
platform_external_arm-neon-tests-c8aa0f690d4febd69842708d468673b7f2c99c25.tar.bz2
platform_external_arm-neon-tests-c8aa0f690d4febd69842708d468673b7f2c99c25.zip
Add more corner case tests.
Diffstat (limited to 'ref_vqrshl.c')
-rw-r--r--ref_vqrshl.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/ref_vqrshl.c b/ref_vqrshl.c
index 9fb652b..975d7aa 100644
--- a/ref_vqrshl.c
+++ b/ref_vqrshl.c
@@ -265,4 +265,31 @@ FNNAME (INSN)
TEST_MSG " (checking overflow: large negative shift amount)");
TEST_MACRO_ALL_VARIANTS_1_5(TEST_VQRSHL, int);
dump_results_hex2 (TEST_MSG, " (checking overflow: large negative shift amount)");
+
+
+ /* Fill input vector with 0, to check saturation in case of large
+ * shift amount */
+ TEST_VDUP(vector, , int, s, 8, 8, 0);
+ TEST_VDUP(vector, , int, s, 16, 4, 0);
+ TEST_VDUP(vector, , int, s, 32, 2, 0);
+ TEST_VDUP(vector, , int, s, 64, 1, 0);
+ TEST_VDUP(vector, q, int, s, 8, 16, 0);
+ TEST_VDUP(vector, q, int, s, 16, 8, 0);
+ TEST_VDUP(vector, q, int, s, 32, 4, 0);
+ TEST_VDUP(vector, q, int, s, 64, 2, 0);
+
+ /* Use large shift amount */
+ TEST_VDUP(vector_shift, , int, s, 8, 8, -10);
+ TEST_VDUP(vector_shift, , int, s, 16, 4, -20);
+ TEST_VDUP(vector_shift, , int, s, 32, 2, -40);
+ TEST_VDUP(vector_shift, , int, s, 64, 1, -70);
+ TEST_VDUP(vector_shift, q, int, s, 8, 16, -10);
+ TEST_VDUP(vector_shift, q, int, s, 16, 8, -20);
+ TEST_VDUP(vector_shift, q, int, s, 32, 4, -40);
+ TEST_VDUP(vector_shift, q, int, s, 64, 2, -70);
+
+ fprintf(ref_file, "\n%s overflow output:\n",
+ TEST_MSG " (checking overflow: large shift amount with 0 input)");
+ TEST_MACRO_ALL_VARIANTS_1_5(TEST_VQRSHL, int);
+ dump_results_hex2 (TEST_MSG, " (checking overflow: large shift amount with 0 input)");
}