OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tls/] [pic-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target fpic } */
3
/* { dg-options "-O2 -fpic -ftls-model=global-dynamic" } */
4
/* { dg-require-effective-target tls } */
5
 
6
extern __thread long e1;
7
extern __thread int e2;
8
static __thread long s1;
9
static __thread int s2;
10
 
11
long *ae1 (void)
12
{
13
  return &e1;
14
}
15
 
16
int *ae2 (void)
17
{
18
  return &e2;
19
}
20
 
21
long *as1 (void)
22
{
23
  return &s1;
24
}
25
 
26
int *as2 (void)
27
{
28
  return &s2;
29
}
30
 
31
long ge1 (void)
32
{
33
  return e1;
34
}
35
 
36
int ge2 (void)
37
{
38
  return e2;
39
}
40
 
41
long gs1 (void)
42
{
43
  return s1;
44
}
45
 
46
int gs2 (void)
47
{
48
  return s2;
49
}
50
 
51
long ge3 (void)
52
{
53
  return e1 + e2;
54
}
55
 
56
long gs3 (void)
57
{
58
  return s1 + s2;
59
}
60
 
61
long ge4 (void)
62
{
63
  if (0)
64
    return e1;
65
  return e2;
66
}
67
 
68
long gs4 (void)
69
{
70
  if (0)
71
    return s1;
72
  return s2;
73
}

powered by: WebSVN 2.1.0

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