URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
union u
|
union u
|
{
|
{
|
struct {unsigned h, l;} i;
|
struct {unsigned h, l;} i;
|
double d;
|
double d;
|
};
|
};
|
|
|
foo (union u x)
|
foo (union u x)
|
{
|
{
|
while (x.i.h++)
|
while (x.i.h++)
|
{
|
{
|
while (x.i.l-- > 0)
|
while (x.i.l-- > 0)
|
;
|
;
|
while (x.d++ > 0)
|
while (x.d++ > 0)
|
;
|
;
|
}
|
}
|
}
|
}
|
|
|
union n
|
union n
|
{
|
{
|
long long unsigned i;
|
long long unsigned i;
|
double d;
|
double d;
|
};
|
};
|
|
|
bar (union n x)
|
bar (union n x)
|
{
|
{
|
int i;
|
int i;
|
for (i = 0; i < 100; i++)
|
for (i = 0; i < 100; i++)
|
{
|
{
|
while (--x.i > 0)
|
while (--x.i > 0)
|
;
|
;
|
while (++x.d > 0)
|
while (++x.d > 0)
|
;
|
;
|
}
|
}
|
return x.i;
|
return x.i;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.