URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 816 |
Rev 826 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-fwrapv" } */
|
/* { dg-options "-fwrapv" } */
|
|
|
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w );
|
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w );
|
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w )
|
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w )
|
{
|
{
|
unsigned n = tn + bb;
|
unsigned n = tn + bb;
|
do {
|
do {
|
e = (e > n) ? e : *w;
|
e = (e > n) ? e : *w;
|
n -= (e > n) ? n : e;
|
n -= (e > n) ? n : e;
|
if (*w)
|
if (*w)
|
*w = 0;
|
*w = 0;
|
} while ( n );
|
} while ( n );
|
}
|
}
|
int main()
|
int main()
|
{
|
{
|
unsigned w = 0;
|
unsigned w = 0;
|
foo( 0, 0, 0, &w );
|
foo( 0, 0, 0, &w );
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.