URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
/* On IRIX 6, PB is passed partially in registers and partially on the
|
/* On IRIX 6, PB is passed partially in registers and partially on the
|
stack, with an odd number of words in the register part. Check that
|
stack, with an odd number of words in the register part. Check that
|
the long double stack argument (PC) is still accessed properly. */
|
the long double stack argument (PC) is still accessed properly. */
|
|
|
struct s { int val[16]; };
|
struct s { int val[16]; };
|
|
|
long double f (int pa, struct s pb, long double pc)
|
long double f (int pa, struct s pb, long double pc)
|
{
|
{
|
int i;
|
int i;
|
|
|
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
pc += pb.val[i];
|
pc += pb.val[i];
|
return pc;
|
return pc;
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
struct s x;
|
struct s x;
|
int i;
|
int i;
|
|
|
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
x.val[i] = i + 1;
|
x.val[i] = i + 1;
|
if (f (1, x, 10000.0L) != 10136.0L)
|
if (f (1, x, 10000.0L) != 10136.0L)
|
abort ();
|
abort ();
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.