URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
extern void exit (int);
|
extern void exit (int);
|
extern void abort (void);
|
extern void abort (void);
|
extern unsigned short f (short a) __attribute__((__noinline__));
|
extern unsigned short f (short a) __attribute__((__noinline__));
|
|
|
unsigned short
|
unsigned short
|
f (short a)
|
f (short a)
|
{
|
{
|
short b;
|
short b;
|
|
|
if (a > 0)
|
if (a > 0)
|
return 0;
|
return 0;
|
b = ((int) a) + - (int) 32768;
|
b = ((int) a) + - (int) 32768;
|
return b;
|
return b;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if (sizeof (short) < 2
|
if (sizeof (short) < 2
|
|| sizeof (short) >= sizeof (int))
|
|| sizeof (short) >= sizeof (int))
|
exit (0);
|
exit (0);
|
|
|
if (f (-32767) != 1)
|
if (f (-32767) != 1)
|
abort ();
|
abort ();
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.