aboutsummaryrefslogtreecommitdiff
path: root/ref_v_comp_op.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_v_comp_op.c
parentae97a862ad03f118f56e9b4d099f1fcf1d50c541 (diff)
downloadarm-neon-tests-c8aa0f690d4febd69842708d468673b7f2c99c25.tar.gz
Add more corner case tests.
Diffstat (limited to 'ref_v_comp_op.c')
-rw-r--r--ref_v_comp_op.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/ref_v_comp_op.c b/ref_v_comp_op.c
index b96ee92..7111469 100644
--- a/ref_v_comp_op.c
+++ b/ref_v_comp_op.c
@@ -30,6 +30,7 @@ THE SOFTWARE.
#endif
#include "stm-arm-neon-ref.h"
+#include <math.h>
#define FNNAME1(NAME) void exec_ ## NAME (void)
@@ -175,4 +176,31 @@ FNNAME (INSN_NAME)
TEST_VDUP(vector2, , float, f, 32, 2, -16.0f);
TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
DUMP(TEST_MSG, uint, 32, 2, PRIx32);
+
+
+ /* Extra FP tests with special values (NaN, ....) */
+ TEST_VDUP(vector, , float, f, 32, 2, 1.0);
+ TEST_VDUP(vector2, , float, f, 32, 2, NAN);
+ TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
+ DUMP(TEST_MSG " FP special (NAN)", uint, 32, 2, PRIx32);
+
+ TEST_VDUP(vector, , float, f, 32, 2, NAN);
+ TEST_VDUP(vector2, , float, f, 32, 2, 1.0);
+ TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
+ DUMP(TEST_MSG " FP special (NAN)", uint, 32, 2, PRIx32);
+
+ TEST_VDUP(vector, , float, f, 32, 2, 1.0);
+ TEST_VDUP(vector2, , float, f, 32, 2, HUGE_VALF);
+ TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
+ DUMP(TEST_MSG " FP special (inf)", uint, 32, 2, PRIx32);
+
+ TEST_VDUP(vector, , float, f, 32, 2, HUGE_VALF);
+ TEST_VDUP(vector2, , float, f, 32, 2, 1.0);
+ TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
+ DUMP(TEST_MSG " FP special (inf)", uint, 32, 2, PRIx32);
+
+ TEST_VDUP(vector, , float, f, 32, 2, -0.0);
+ TEST_VDUP(vector2, , float, f, 32, 2, 0.0);
+ TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
+ DUMP(TEST_MSG " FP special (-0.0)", uint, 32, 2, PRIx32);
}