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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [bfin/] [l2.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run { target bfin-*-linux-uclibc } } */
2
/* { dg-bfin-processors bf544 bf547 bf548 bf549 bf561} */
3
 
4
#if defined(__ADSPBF544__)
5
#define L2_START 0xFEB00000
6
#define L2_LENGTH 0x10000
7
#else
8
#define L2_START 0xFEB00000
9
#define L2_LENGTH 0x20000
10
#endif
11
 
12
int n __attribute__ ((l2));
13
 
14
int foo (int i) __attribute__ ((l2));
15
 
16
int foo (int a)
17
{
18
  return a + 1;
19
}
20
 
21
int main ()
22
{
23
  int r;
24
  unsigned long *p;
25
 
26
  p = (unsigned long *) foo;
27
  if (*p < L2_START || *p >= L2_START + L2_LENGTH)
28
    return 1;
29
 
30
  p = (unsigned long *) &n;
31
  if ((unsigned long) p < L2_START || (unsigned long) p >= L2_START + L2_LENGTH)
32
    return 2;
33
 
34
  if (foo (0) != 1)
35
    return 3;
36
 
37
  return 0;
38
}

powered by: WebSVN 2.1.0

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