This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] tile: create new math-tests.h header
- From: Chris Metcalf <cmetcalf at mellanox dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Cc: Chris Metcalf <cmetcalf at mellanox dot com>
- Date: Wed, 16 Nov 2016 16:39:36 -0500
- Subject: [PATCH] tile: create new math-tests.h header
- Authentication-results: sourceware.org; auth=none
The header makes tile use the new mechanisms for suppressing
exception and rounding support (the ROUNDING_TESTS_xxx() and
EXCEPTION_TESTS_xxx macros). More importantly, it also now sets
SNAN_TESTS_PRESERVE_PAYLOAD to 0, since the tile soft float does
not preserve NaN payloads.
---
This change fixes the math/test-{,i}{double,float} failures.
2016-11-16 Chris Metcalf <cmetcalf@mellanox.com>
* sysdeps/tile/math-tests.h: New file.
sysdeps/tile/math-tests.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 sysdeps/tile/math-tests.h
diff --git a/sysdeps/tile/math-tests.h b/sysdeps/tile/math-tests.h
new file mode 100644
index 000000000000..eeade64d54da
--- /dev/null
+++ b/sysdeps/tile/math-tests.h
@@ -0,0 +1,31 @@
+/* Configuration for math tests. Tile version.
+ Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Tile soft float does not support exceptions and rounding modes. */
+#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
+#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
+#define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST)
+#define EXCEPTION_TESTS_float 0
+#define EXCEPTION_TESTS_double 0
+#define EXCEPTION_TESTS_long_double 0
+
+/* Tile soft float does not preserve NaN payloads when converting a
+ signaling NaN to quiet. */
+#define SNAN_TESTS_PRESERVE_PAYLOAD 0
+
+#include_next <math-tests.h>
--
2.7.2