aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/frv/fr400-builtins-1.c
blob: 85ca7cfbf0a46f4bee795c09d8d6430b3e57d54a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Test prefetch support.  */
/* { dg-options "-mcpu=fr400" } */
/* { dg-do run } */

unsigned char global[64];

int foo (unsigned int *x, int n)
{
  unsigned short local[16];

  __data_prefetch0 (x);
  __data_prefetch0 (&x[8]);
  __data_prefetch0 (&x[n]);
  __data_prefetch0 (local);
  __data_prefetch0 (&local[16]);
  __data_prefetch0 (&local[n]);
  __data_prefetch0 (global);
  __data_prefetch0 (&global[32]);
  __data_prefetch0 (&global[n]);
}

int main ()
{
  unsigned int i[16];

  foo (i, 2);
  return 0;
}