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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020402-2.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR 3967
2
 
3
   local-alloc screwed up consideration of high+lo_sum and created
4
   reg_equivs that it shouldn't have, resulting in lo_sum with
5
   uninitialized data, resulting in segv.  The test has to remain
6
   relatively large, since register spilling is required to twig
7
   the bug.  */
8
 
9
unsigned long *Local1;
10
unsigned long *Local2;
11
unsigned long *Local3;
12
unsigned long *RDbf1;
13
unsigned long *RDbf2;
14
unsigned long *RDbf3;
15
unsigned long *IntVc1;
16
unsigned long *IntVc2;
17
unsigned long *IntCode3;
18
unsigned long *IntCode4;
19
unsigned long *IntCode5;
20
unsigned long *IntCode6;
21
unsigned long *Lom1;
22
unsigned long *Lom2;
23
unsigned long *Lom3;
24
unsigned long *Lom4;
25
unsigned long *Lom5;
26
unsigned long *Lom6;
27
unsigned long *Lom7;
28
unsigned long *Lom8;
29
unsigned long *Lom9;
30
unsigned long *Lom10;
31
unsigned long *RDbf11;
32
unsigned long *RDbf12;
33
 
34
typedef struct
35
  {
36
    long a1;
37
    unsigned long n1;
38
    unsigned long local1;
39
    unsigned long local2;
40
    unsigned long local3;
41
    unsigned long rdbf1;
42
    unsigned long rdbf2;
43
    unsigned long milli;
44
    unsigned long frames1;
45
    unsigned long frames2;
46
    unsigned long nonShared;
47
    long newPrivate;
48
    long freeLimit;
49
    unsigned long cache1;
50
    unsigned long cache2;
51
    unsigned long cache3;
52
    unsigned long cache4;
53
    unsigned long cache5;
54
    unsigned long time6;
55
    unsigned long frames7;
56
    unsigned long page8;
57
    unsigned long ot9;
58
    unsigned long data10;
59
    unsigned long bm11;
60
    unsigned long misc12;
61
  }
62
ShrPcCommonStatSType;
63
 
64
 
65
typedef struct
66
  {
67
    unsigned long sharedAttached;
68
    unsigned long totalAttached;
69
    long avgPercentShared;
70
    unsigned long numberOfFreeFrames;
71
    unsigned long localDirtyPageCount;
72
    unsigned long globalDirtyPageCount;
73
    long wakeupInterval;
74
    unsigned long numActiveProcesses;
75
    unsigned long numRecentActiveProcesses;
76
    unsigned long gemDirtyPageKinds[10];
77
    unsigned long stoneDirtyPageKinds[10];
78
    unsigned long gemsInCacheCount;
79
    long targetFreeFrameCount;
80
  }
81
ShrPcMonStatSType;
82
 
83
typedef struct
84
  {
85
    unsigned long c1;
86
    unsigned long c2;
87
    unsigned long c3;
88
    unsigned long c4;
89
    unsigned long c5;
90
    unsigned long c6;
91
    unsigned long c7;
92
    unsigned long c8;
93
    unsigned long c9;
94
    unsigned long c10;
95
    unsigned long c11;
96
    unsigned long c12;
97
    unsigned long a1;
98
    unsigned long a2;
99
    unsigned long a3;
100
    unsigned long a4;
101
    unsigned long a5;
102
    unsigned long a6;
103
    unsigned long a7;
104
    unsigned long a8;
105
    unsigned long a9;
106
    unsigned long a10;
107
    unsigned long a11;
108
    unsigned long a12;
109
    unsigned long a13;
110
    unsigned long a14;
111
    unsigned long a15;
112
    unsigned long a16;
113
    unsigned long a17;
114
    unsigned long a18;
115
    unsigned long a19;
116
    unsigned long sessionStats[40];
117
  }
118
ShrPcGemStatSType;
119
 
120
union ShrPcStatUnion
121
  {
122
    ShrPcMonStatSType monitor;
123
    ShrPcGemStatSType gem;
124
  };
125
 
126
typedef struct
127
  {
128
    int processId;
129
    int sessionId;
130
    ShrPcCommonStatSType cmn;
131
    union ShrPcStatUnion u;
132
  } ShrPcStatsSType;
133
 
134
typedef struct
135
  {
136
    unsigned long *p1;
137
    unsigned long *p2;
138
    unsigned long *p3;
139
    unsigned long *p4;
140
    unsigned long *p5;
141
    unsigned long *p6;
142
    unsigned long *p7;
143
    unsigned long *p8;
144
    unsigned long *p9;
145
    unsigned long *p10;
146
    unsigned long *p11;
147
  }
148
WorkEntrySType;
149
 
150
WorkEntrySType Workspace;
151
 
152
static void
153
setStatPointers (ShrPcStatsSType * statsPtr, long sessionId)
154
{
155
  statsPtr->sessionId = sessionId;
156
  statsPtr->cmn.a1 = 0;
157
  statsPtr->cmn.n1 = 5;
158
 
159
  Local1 = &statsPtr->cmn.local1;
160
  Local2 = &statsPtr->cmn.local2;
161
  Local3 = &statsPtr->cmn.local3;
162
  RDbf1 = &statsPtr->cmn.rdbf1;
163
  RDbf2 = &statsPtr->cmn.rdbf2;
164
  RDbf3 = &statsPtr->cmn.milli;
165
  *RDbf3 = 1;
166
 
167
  IntVc1 = &statsPtr->u.gem.a1;
168
  IntVc2 = &statsPtr->u.gem.a2;
169
  IntCode3 = &statsPtr->u.gem.a3;
170
  IntCode4 = &statsPtr->u.gem.a4;
171
  IntCode5 = &statsPtr->u.gem.a5;
172
  IntCode6 = &statsPtr->u.gem.a6;
173
 
174
  {
175
    WorkEntrySType *workSpPtr;
176
    workSpPtr = &Workspace;
177
    workSpPtr->p1 = &statsPtr->u.gem.a7;
178
    workSpPtr->p2 = &statsPtr->u.gem.a8;
179
    workSpPtr->p3 = &statsPtr->u.gem.a9;
180
    workSpPtr->p4 = &statsPtr->u.gem.a10;
181
    workSpPtr->p5 = &statsPtr->u.gem.a11;
182
    workSpPtr->p6 = &statsPtr->u.gem.a12;
183
    workSpPtr->p7 = &statsPtr->u.gem.a13;
184
    workSpPtr->p8 = &statsPtr->u.gem.a14;
185
    workSpPtr->p9 = &statsPtr->u.gem.a15;
186
    workSpPtr->p10 = &statsPtr->u.gem.a16;
187
    workSpPtr->p11 = &statsPtr->u.gem.a17;
188
  }
189
  Lom1 = &statsPtr->u.gem.c1;
190
  Lom2 = &statsPtr->u.gem.c2;
191
  Lom3 = &statsPtr->u.gem.c3;
192
  Lom4 = &statsPtr->u.gem.c4;
193
  Lom5 = &statsPtr->u.gem.c5;
194
  Lom6 = &statsPtr->u.gem.c6;
195
  Lom7 = &statsPtr->u.gem.c7;
196
  Lom8 = &statsPtr->u.gem.c8;
197
  Lom9 = &statsPtr->u.gem.c9;
198
  Lom10 = &statsPtr->u.gem.c10;
199
  RDbf11 = &statsPtr->u.gem.c11;
200
  RDbf12 = &statsPtr->u.gem.c12;
201
}
202
 
203
typedef struct
204
{
205
  ShrPcStatsSType stats;
206
} ShrPcPteSType;
207
 
208
ShrPcPteSType MyPte;
209
 
210
static void
211
initPte (void *shrpcPtr, long sessionId)
212
{
213
  ShrPcPteSType *ptePtr;
214
 
215
  ptePtr = &MyPte;
216
  setStatPointers (&ptePtr->stats, sessionId);
217
}
218
 
219
void
220
InitCache (int sessionId)
221
{
222
  initPte (0, sessionId);
223
}
224
 
225
int
226
main (int argc, char *argv[])
227
{
228
  InitCache (5);
229
  return 0;
230
}

powered by: WebSVN 2.1.0

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