URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* The fp-bit.c function __floatunsisf had a latent bug where guard bits
|
/* The fp-bit.c function __floatunsisf had a latent bug where guard bits
|
could be lost leading to incorrect rounding. */
|
could be lost leading to incorrect rounding. */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
extern void exit (int);
|
extern void exit (int);
|
#if __INT_MAX__ >= 0x7fffffff
|
#if __INT_MAX__ >= 0x7fffffff
|
volatile unsigned u = 0x80000081;
|
volatile unsigned u = 0x80000081;
|
#else
|
#else
|
volatile unsigned long u = 0x80000081;
|
volatile unsigned long u = 0x80000081;
|
#endif
|
#endif
|
volatile float f1, f2;
|
volatile float f1, f2;
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
f1 = (float) u;
|
f1 = (float) u;
|
f2 = (float) 0x80000081;
|
f2 = (float) 0x80000081;
|
if (f1 != f2)
|
if (f1 != f2)
|
abort ();
|
abort ();
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.