public inbox for
 help / color / mirror / Atom feed
* Add math-tests.h for MIPS
@ 2013-06-14 20:22 Joseph S. Myers
  0 siblings, 0 replies; only message in thread
From: Joseph S. Myers @ 2013-06-14 20:22 UTC (permalink / raw)
  To: libc-ports

I've applied this patch to add a math-tests.h file for MIPS, to reduce
spurious test failures for soft-float and long double.

2013-06-14  Joseph Myers  <>

	* sysdeps/mips/math-tests.h: New file.

diff --git a/ports/sysdeps/mips/math-tests.h b/ports/sysdeps/mips/math-tests.h
new file mode 100644
index 0000000..d2edd46
--- /dev/null
+++ b/ports/sysdeps/mips/math-tests.h
@@ -0,0 +1,37 @@
+/* Configuration for math tests.  MIPS version.
+   Copyright (C) 2013 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
+   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
+   <>.  */
+#include <sgidefs.h>
+/* MIPS soft float does not support exceptions and rounding modes, and
+   long double when wider than double is implemented using fp-bit
+   which does not integrate with hardware exceptions and rounding
+   modes.  */
+#ifdef __mips_soft_float
+# 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
+#elif _MIPS_SIM != _ABIO32
+# define ROUNDING_TESTS_long_double(MODE)	((MODE) == FE_TONEAREST)
+# define EXCEPTION_TESTS_long_double	0
+#include_next <math-tests.h>

Joseph S. Myers

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-14 20:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-14 20:22 Add math-tests.h for MIPS Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).