Commit 22892fc6 by Jeffrey Oldham Committed by Jeffrey D. Oldham

20000320-1.c (main): For MIPS...

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.

From-SVN: r39268
parent 69d211dd
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.
......
#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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment