aboutsummaryrefslogtreecommitdiffstats
path: root/ref_vabal.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_vabal.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_vabal.c')
-rw-r--r--ref_vabal.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/ref_vabal.c b/ref_vabal.c
index dc62687..a93f5b9 100644
--- a/ref_vabal.c
+++ b/ref_vabal.c
@@ -100,4 +100,29 @@ void exec_vabal (void)
TEST_VABAL(uint, u, 32, 64, 2);
dump_results_hex (TEST_MSG);
+
+ /* Use values that could lead to overflow intermediate
+ * calculations. */
+ TEST_VDUP(vector2, , int, s, 8, 8, 0x80);
+ TEST_VDUP(vector2, , int, s, 16, 4, 0x8000);
+ TEST_VDUP(vector2, , int, s, 32, 2, 0x80000000);
+ TEST_VDUP(vector2, , uint, u, 8, 8, 1);
+ TEST_VDUP(vector2, , uint, u, 16, 4, 13);
+ TEST_VDUP(vector2, , uint, u, 32, 2, 8);
+
+ TEST_VDUP(vector3, , int, s, 8, 8, 0x7f);
+ TEST_VDUP(vector3, , int, s, 16, 4, 0x7fff);
+ TEST_VDUP(vector3, , int, s, 32, 2, 0x7fffffff);
+ TEST_VDUP(vector3, , uint, u, 8, 8, 0xff);
+ TEST_VDUP(vector3, , uint, u, 16, 4, 0xffff);
+ TEST_VDUP(vector3, , uint, u, 32, 2, 0xffffffff);
+
+ TEST_VABAL(int, s, 8, 16, 8);
+ TEST_VABAL(int, s, 16, 32, 4);
+ TEST_VABAL(int, s, 32, 64, 2);
+ TEST_VABAL(uint, u, 8, 16, 8);
+ TEST_VABAL(uint, u, 16, 32, 4);
+ TEST_VABAL(uint, u, 32, 64, 2);
+
+ dump_results_hex2 (TEST_MSG, " test intermediate overflow");
}