URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* Test prefetch support. */
|
/* Test prefetch support. */
|
/* { dg-options "-mcpu=fr400" } */
|
/* { dg-options "-mcpu=fr400" } */
|
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
unsigned char global[64];
|
unsigned char global[64];
|
|
|
int foo (unsigned int *x, int n)
|
int foo (unsigned int *x, int n)
|
{
|
{
|
unsigned short local[16];
|
unsigned short local[16];
|
|
|
__data_prefetch0 (x);
|
__data_prefetch0 (x);
|
__data_prefetch0 (&x[8]);
|
__data_prefetch0 (&x[8]);
|
__data_prefetch0 (&x[n]);
|
__data_prefetch0 (&x[n]);
|
__data_prefetch0 (local);
|
__data_prefetch0 (local);
|
__data_prefetch0 (&local[16]);
|
__data_prefetch0 (&local[16]);
|
__data_prefetch0 (&local[n]);
|
__data_prefetch0 (&local[n]);
|
__data_prefetch0 (global);
|
__data_prefetch0 (global);
|
__data_prefetch0 (&global[32]);
|
__data_prefetch0 (&global[32]);
|
__data_prefetch0 (&global[n]);
|
__data_prefetch0 (&global[n]);
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
unsigned int i[16];
|
unsigned int i[16];
|
|
|
foo (i, 2);
|
foo (i, 2);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.