summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 17:58:26 +0000
committeroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 17:58:26 +0000
commitcd42fcd7d38cd9392951aebdf318ce3508b9efc8 (patch)
tree1319630a72afdaedea6e0c181e8c6e61e0583d71
parent69f1ee0e7e19cab89735d0369672db6583ebcc85 (diff)
downloadppe42-gcc-cd42fcd7d38cd9392951aebdf318ce3508b9efc8.tar.gz
ppe42-gcc-cd42fcd7d38cd9392951aebdf318ce3508b9efc8.zip
2001-01-25 Jeffrey Oldham <oldham@codesourcery.com>
* gcc.c-torture/execute/ieee/20000320-1.c (main): For MIPS, change floating point number rounding mode to round to the nearest representable mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39268 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a8352d8a3fe..cbe116f9b9b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-25 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * gcc.c-torture/execute/ieee/20000320-1.c (main): For MIPS, change
+ floating point number rounding mode to round to the nearest
+ representable mode.
+
2001-01-25 Jakub Jelinek <jakub@redhat.com>
* g++.old-deja/g++.other/mangle2.C: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
index 798e54256bf..274a12ebfc4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
@@ -1,3 +1,6 @@
+#if defined(__mips__) && defined(__sgi__)
+#include <sys/fpu.h>
+#endif /* defined(__mips__) && defined(__sgi__) */
#include <limits.h>
#if UINT_MAX != 4294967295u || (ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull)
int main(void) { exit (0); }
@@ -32,6 +35,15 @@ void c(ull d, ul f)
int main()
{
+#if defined(__mips__) && defined(__sgi__)
+ /* Many MIPS chips round denormalized floating point numbers to zero
+ rather than follow the IEEE standard. Change the rounding mode
+ to correspond to the IEEE rounding mode that rounds numbers to
+ the nearest representable mode, the most common IEEE rounding
+ mode. */
+ set_fpc_csr(0);
+#endif /* defined(__mips__) && defined(__sgi__) */
+
if (sizeof (float) != sizeof (ul)
|| sizeof (double) != sizeof (ull))
exit (0);
OpenPOWER on IntegriCloud