URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2" } */
|
/* { dg-options "-O2" } */
|
|
|
unsigned array[4];
|
unsigned array[4];
|
|
|
#ifdef _WIN64
|
#ifdef _WIN64
|
__extension__ typedef unsigned long long TYPE;
|
__extension__ typedef unsigned long long TYPE;
|
#else
|
#else
|
#define TYPE unsigned long
|
#define TYPE unsigned long
|
#endif
|
#endif
|
|
|
unsigned foo(TYPE x)
|
unsigned foo(TYPE x)
|
{
|
{
|
return array[(x>>2)&3ul];
|
return array[(x>>2)&3ul];
|
}
|
}
|
|
|
/* { dg-final { scan-assembler-not "shr\[^\\n\]*2" } } */
|
/* { dg-final { scan-assembler-not "shr\[^\\n\]*2" } } */
|
/* { dg-final { scan-assembler "and\[^\\n\]*12" } } */
|
/* { dg-final { scan-assembler "and\[^\\n\]*12" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.