aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2011-10-17 15:53:53 +0200
committerChristophe Lyon <christophe.lyon@st.com>2011-10-17 15:53:53 +0200
commit269df92488695ef609d3759a28fa725a677161e2 (patch)
treee81cbd5bd97a5814a9b5c4aeef2d6f0e0d53a3aa
parent836da4addcbdd1b6a2124e38fcd4013c0696770f (diff)
downloadplatform_external_arm-neon-tests-269df92488695ef609d3759a28fa725a677161e2.tar.gz
platform_external_arm-neon-tests-269df92488695ef609d3759a28fa725a677161e2.tar.bz2
platform_external_arm-neon-tests-269df92488695ef609d3759a28fa725a677161e2.zip
Fix/add tests with -NaN, -inf
-rw-r--r--ref_v_comp_op.c14
-rw-r--r--ref_vmax.c16
2 files changed, 25 insertions, 5 deletions
diff --git a/ref_v_comp_op.c b/ref_v_comp_op.c
index 7111469..ef6f508 100644
--- a/ref_v_comp_op.c
+++ b/ref_v_comp_op.c
@@ -182,18 +182,28 @@ FNNAME (INSN_NAME)
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);
+ 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, -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);
+ 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, 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);
diff --git a/ref_vmax.c b/ref_vmax.c
index e89f335..fd0b8ff 100644
--- a/ref_vmax.c
+++ b/ref_vmax.c
@@ -123,12 +123,22 @@ FNNAME (INSN_NAME)
TEST_VDUP(vector, q, float, f, 32, 4, 1.0f);
TEST_VDUP(vector2, q, float, f, 32, 4, NAN);
TEST_BINARY_OP(INSN_NAME, q, float, f, 32, 4);
- DUMP_FP(TEST_MSG " FP special (NAN)", float, 32, 4, PRIx32);
+ DUMP_FP(TEST_MSG " FP special (NaN)", float, 32, 4, PRIx32);
- TEST_VDUP(vector, q, float, f, 32, 4, NAN);
+ TEST_VDUP(vector, q, float, f, 32, 4, -NAN);
TEST_VDUP(vector2, q, float, f, 32, 4, 1.0f);
TEST_BINARY_OP(INSN_NAME, q, float, f, 32, 4);
- DUMP_FP(TEST_MSG " FP special (NAN)", float, 32, 4, PRIx32);
+ DUMP_FP(TEST_MSG " FP special (-NaN)", float, 32, 4, PRIx32);
+
+ TEST_VDUP(vector, q, float, f, 32, 4, 1.0f);
+ TEST_VDUP(vector2, q, float, f, 32, 4, HUGE_VALF);
+ TEST_BINARY_OP(INSN_NAME, q, float, f, 32, 4);
+ DUMP_FP(TEST_MSG " FP special (inf)", float, 32, 4, PRIx32);
+
+ TEST_VDUP(vector, q, float, f, 32, 4, -HUGE_VALF);
+ TEST_VDUP(vector2, q, float, f, 32, 4, 1.0f);
+ TEST_BINARY_OP(INSN_NAME, q, float, f, 32, 4);
+ DUMP_FP(TEST_MSG " FP special (-inf)", float, 32, 4, PRIx32);
TEST_VDUP(vector, q, float, f, 32, 4, 0.0f);
TEST_VDUP(vector2, q, float, f, 32, 4, -0.0f);