Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Skip the tests on ARM if the NEON fpu doe...
details: https://anonhg.NetBSD.org/src/rev/724f472006b7
branches: trunk
changeset: 333838:724f472006b7
user: martin <martin%NetBSD.org@localhost>
date: Tue Nov 18 08:58:08 2014 +0000
description:
Skip the tests on ARM if the NEON fpu does not support exceptions (Cortex).
diffstat:
tests/lib/libc/gen/t_fpsetmask.c | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r 1cf5c0ebe23a -r 724f472006b7 tests/lib/libc/gen/t_fpsetmask.c
--- a/tests/lib/libc/gen/t_fpsetmask.c Tue Nov 18 08:43:03 2014 +0000
+++ b/tests/lib/libc/gen/t_fpsetmask.c Tue Nov 18 08:58:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpsetmask.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_fpsetmask.c,v 1.15 2014/11/18 08:58:08 martin Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -58,8 +58,20 @@
#include <ieeefp.h>
-const char *skip_mesg;
-const char *skip_arch;
+#if __arm__ && !__SOFTFP__
+ /*
+ * Some NEON fpus do not implement IEEE exception handling,
+ * skip these tests if running on them and compiled for
+ * hard float.
+ */
+#define FPU_PREREQ() \
+ if (0 == fpsetmask(fpsetmask(FP_X_INV))) \
+ atf_tc_skip("FPU does not implement exception handling");
+#endif
+
+#ifndef FPU_PREREQ
+#define FPU_PREREQ() /* nothing */
+#endif
void sigfpe(int, siginfo_t *, void *);
@@ -296,6 +308,9 @@
\
ATF_TC_BODY(m##_##t, tc) \
{ \
+ \
+ FPU_PREREQ(); \
+ \
if (strcmp(MACHINE, "macppc") == 0) \
atf_tc_expect_fail("PR port-macppc/46319"); \
\
@@ -323,6 +338,8 @@
size_t i;
fp_except_t msk, lst[] = { FP_X_INV, FP_X_DZ, FP_X_OFL, FP_X_UFL };
+ FPU_PREREQ();
+
msk = fpgetmask();
for (i = 0; i < __arraycount(lst); i++) {
fpsetmask(msk | lst[i]);
Home |
Main Index |
Thread Index |
Old Index