OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [frv/] [fr550-builtins-1.c] - Blame information for rev 325

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 317 jeremybenn
/* Test prefetch support.  */
2
/* { dg-do run } */
3
extern void abort (void);
4
extern void exit (int);
5
 
6
unsigned char global[64];
7
 
8
void
9
foo (unsigned int *x, int n)
10
{
11
  unsigned short local[16];
12
 
13
  __data_prefetch0 (x);
14
  __data_prefetch0 (&x[8]);
15
  __data_prefetch0 (&x[n]);
16
  __data_prefetch0 (local);
17
  __data_prefetch0 (&local[16]);
18
  __data_prefetch0 (&local[n]);
19
  __data_prefetch0 (global);
20
  __data_prefetch0 (&global[32]);
21
  __data_prefetch0 (&global[n]);
22
 
23
#if __FRV_VLIW__ > 1
24
  __data_prefetch (x);
25
  __data_prefetch (&x[8]);
26
  __data_prefetch (&x[n]);
27
  __data_prefetch (local);
28
  __data_prefetch (&local[16]);
29
  __data_prefetch (&local[n]);
30
  __data_prefetch (global);
31
  __data_prefetch (&global[32]);
32
  __data_prefetch (&global[n]);
33
#endif
34
}
35
 
36
int main ()
37
{
38
  unsigned int i[16];
39
 
40
  foo (i, 2);
41
  exit (0);
42
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.