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 |
int
|
int
|
foo1 (value)
|
foo1 (value)
|
long long value;
|
long long value;
|
{
|
{
|
register const long long constant = 0xc000000080000000LL;
|
register const long long constant = 0xc000000080000000LL;
|
|
|
if (value < constant)
|
if (value < constant)
|
return 1;
|
return 1;
|
else
|
else
|
return 2;
|
return 2;
|
}
|
}
|
|
|
int
|
int
|
foo2 (value)
|
foo2 (value)
|
unsigned long long value;
|
unsigned long long value;
|
{
|
{
|
register const unsigned long long constant = 0xc000000080000000LL;
|
register const unsigned long long constant = 0xc000000080000000LL;
|
|
|
if (value < constant)
|
if (value < constant)
|
return 1;
|
return 1;
|
else
|
else
|
return 2;
|
return 2;
|
}
|
}
|
|
|
main ()
|
main ()
|
{
|
{
|
unsigned long long value = 0xc000000000000001LL;
|
unsigned long long value = 0xc000000000000001LL;
|
int x, y;
|
int x, y;
|
|
|
x = foo1 (value);
|
x = foo1 (value);
|
y = foo2 (value);
|
y = foo2 (value);
|
if (x != y || x != 1)
|
if (x != y || x != 1)
|
abort ();
|
abort ();
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.