336
|
1
|
|
2
|
|
3 typedef union {
|
|
4 struct _PTE {
|
|
5 unsigned long v:1;
|
|
6 unsigned long vsid:24;
|
|
7 unsigned long h:1;
|
|
8 unsigned long api:6;
|
|
9 unsigned long rpn:20;
|
|
10
|
|
11 unsigned long :3;
|
|
12 unsigned long r:1;
|
|
13 unsigned long c:1;
|
|
14 unsigned long w:1;
|
|
15 unsigned long i:1;
|
|
16 unsigned long m:1;
|
|
17 unsigned long g:1;
|
|
18 unsigned long :1;
|
|
19 unsigned long pp:2;
|
338
|
20 long long lpn:40;
|
336
|
21 } pte;
|
|
22 struct {
|
365
|
23 char v:1;
|
336
|
24 signed long vsid:24;
|
|
25 unsigned long h:1;
|
|
26 signed char api:6;
|
|
27 signed long rpn:20;
|
|
28
|
|
29 signed long :3;
|
|
30 unsigned long r:1;
|
|
31 unsigned long c:1;
|
|
32 unsigned long w:1;
|
|
33 unsigned long i:1;
|
|
34 unsigned long m:1;
|
|
35 unsigned long g:1;
|
|
36 unsigned long :1;
|
|
37 signed long pp:2;
|
|
38 } sg;
|
|
39 unsigned long u[2];
|
|
40 } PTE;
|
|
41
|
|
42 PTE g;
|
|
43
|
|
44 main()
|
|
45 {
|
|
46 PTE a,*p;
|
|
47 int i = 0;
|
|
48 int j = 0;
|
|
49
|
|
50 a.pte.rpn = 55;
|
|
51 j = a.pte.rpn;
|
|
52 printf("% 3d: %d\n",i++,j);
|
|
53 a.pte.c = 1;
|
|
54 j = a.pte.c;
|
|
55 printf("% 3d: %d\n",i++,j);
|
|
56 a.pte.pp = -1;
|
|
57 j = a.pte.pp;
|
|
58 printf("% 3d: %d\n",i++,j);
|
|
59 a.sg.pp = -1;
|
|
60 j = a.sg.pp;
|
|
61 printf("% 3d: %d\n",i++,j);
|
|
62
|
|
63 p = &g;
|
|
64
|
|
65 g.u[0]=0;
|
|
66 g.u[1]=0;
|
|
67
|
|
68 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
69 g.pte. v = 3;
|
|
70 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
71 g.pte. vsid = -1;
|
|
72 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
73 g.pte. h = 3;
|
|
74 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
75 g.pte. api = 3;
|
|
76 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
77 g.pte. rpn = 3;
|
|
78 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
79
|
|
80 g.pte. r = 3;
|
|
81 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
82 g.pte. c = 3;
|
|
83 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
84 g.pte. w = 3;
|
|
85 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
86 g.pte. i = 3;
|
|
87 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
88 g.pte. m = 3;
|
|
89 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
90 g.pte. g = 3;
|
|
91 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
92 g.pte. pp = 3;
|
|
93 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
94
|
|
95 g.u[0]=-1;
|
|
96 g.u[1]=-1;
|
|
97
|
|
98 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
99 g.pte. v = 0;
|
|
100 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
101 g.pte. vsid = 0;
|
|
102 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
103 g.pte. h = 0;
|
|
104 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
105 g.pte. api = 0;
|
|
106 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
107 g.pte. rpn = 0;
|
|
108 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
109
|
|
110 g.pte. r = 0;
|
|
111 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
112 g.pte. c = 0;
|
|
113 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
114 g.pte. w = 0;
|
|
115 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
116 g.pte. i = 0;
|
|
117 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
118 g.pte. m = 0;
|
|
119 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
120 g.pte. g = 0;
|
|
121 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
122 g.pte. pp = 0;
|
|
123 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
124
|
|
125 g.u[0]=-1;
|
|
126 g.u[1]=-1;
|
|
127
|
|
128 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
129 g.pte. v = 0x5555555;
|
|
130 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
131 g.pte. vsid = 0x5555555;
|
|
132 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
133 g.pte. h = 0x5555555;
|
|
134 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
135 g.pte. api = 0x5555555;
|
|
136 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
137 g.pte. rpn = 0x5555555;
|
|
138 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
139
|
|
140 g.pte. r = 0x5555555;
|
|
141 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
142 g.pte. c = 0x5555555;
|
|
143 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
144 g.pte. w = 0x5555555;
|
|
145 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
146 g.pte. i = 0x5555555;
|
|
147 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
148 g.pte. m = 0x5555555;
|
|
149 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
150 g.pte. g = 0x5555555;
|
|
151 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
152 g.pte. pp = 0x5555555;
|
|
153 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
154
|
|
155 g.u[0]=-1;
|
|
156 g.u[1]=-1;
|
|
157
|
|
158 for(i=0;i<0x200;i++) {
|
|
159 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
160 g.pte. v = i;
|
|
161 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
162 g.pte. vsid = i;
|
|
163 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
164 g.pte. h = i;
|
|
165 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
166 g.pte. api = i;
|
|
167 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
168 g.pte. rpn = i;
|
|
169 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
170
|
|
171 g.pte. r = i;
|
|
172 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
173 g.pte. c = i;
|
|
174 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
175 g.pte. w = i;
|
|
176 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
177 g.pte. i = i;
|
|
178 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
179 g.pte. m = i;
|
|
180 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
181 g.pte. g = i;
|
|
182 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
183 g.pte. pp = i;
|
|
184 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
185 }
|
|
186
|
|
187 g = a;
|
|
188
|
|
189 printf("%d %d %d\n",a.pte.pp,g.pte.pp,p->pte.pp);
|
|
190 main2();
|
|
191 main5();
|
423
|
192 main5c();
|
338
|
193 main3();
|
|
194 main4();
|
365
|
195 main6();
|
|
196 main7();
|
336
|
197 return 0;
|
|
198 }
|
|
199
|
|
200 main2()
|
|
201 {
|
|
202 int i = 0;
|
|
203
|
|
204 g.u[0]=0;
|
|
205 g.u[1]=0;
|
|
206
|
|
207 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
208 g.sg. v = 3;
|
|
209 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
210 g.sg. vsid = -1;
|
|
211 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
212 g.sg. h = 3;
|
|
213 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
214 g.sg. api = 3;
|
|
215 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
216 g.sg. rpn = 3;
|
|
217 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
218
|
|
219 g.sg. r = 3;
|
|
220 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
221 g.sg. c = 3;
|
|
222 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
223 g.sg. w = 3;
|
|
224 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
225 g.sg. i = 3;
|
|
226 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
227 g.sg. m = 3;
|
|
228 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
229 g.sg. g = 3;
|
|
230 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
231 g.sg. pp = 3;
|
|
232 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
233
|
|
234 g.u[0]=-1;
|
|
235 g.u[1]=-1;
|
|
236
|
|
237 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
238 g.sg. v = 0;
|
|
239 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
240 g.sg. vsid = 0;
|
|
241 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
242 g.sg. h = 0;
|
|
243 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
244 g.sg. api = 0;
|
|
245 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
246 g.sg. rpn = 0;
|
|
247 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
248
|
|
249 g.sg. r = 0;
|
|
250 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
251 g.sg. c = 0;
|
|
252 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
253 g.sg. w = 0;
|
|
254 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
255 g.sg. i = 0;
|
|
256 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
257 g.sg. m = 0;
|
|
258 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
259 g.sg. g = 0;
|
|
260 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
261 g.sg. pp = 0;
|
|
262 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
263
|
|
264 g.u[0]=-1;
|
|
265 g.u[1]=-1;
|
|
266
|
|
267 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
268 g.sg. v = 0x55;
|
|
269 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
270 g.sg. vsid = 0x5555555;
|
|
271 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
272 g.sg. h = 0x5555555;
|
|
273 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
274 g.sg. api = 0x55;
|
|
275 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
276 g.sg. rpn = 0x5555555;
|
|
277 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
278
|
|
279 g.sg. r = 0x5555555;
|
|
280 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
281 g.sg. c = 0x5555555;
|
|
282 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
283 g.sg. w = 0x5555555;
|
|
284 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
285 g.sg. i = 0x5555555;
|
|
286 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
287 g.sg. m = 0x5555555;
|
|
288 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
289 g.sg. g = 0x5555555;
|
|
290 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
291 g.sg. pp = 0x5555555;
|
|
292 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
293
|
|
294 g.u[0]=-1;
|
|
295 g.u[1]=-1;
|
|
296
|
|
297 for(i=-0x100;i<0x100;i++) {
|
|
298 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
299 g.sg. v = i;
|
|
300 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
301 g.sg. vsid = i;
|
|
302 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
303 g.sg. h = i;
|
|
304 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
305 g.sg. api = i;
|
|
306 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
307 g.sg. rpn = i;
|
|
308 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
309
|
|
310 g.sg. r = i;
|
|
311 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
312 g.sg. c = i;
|
|
313 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
314 g.sg. w = i;
|
|
315 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
316 g.sg. i = i;
|
|
317 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
318 g.sg. m = i;
|
|
319 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
320 g.sg. g = i;
|
|
321 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
322 g.sg. pp = i;
|
|
323 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
|
324 }
|
|
325
|
|
326 // printf("size of %d\n",sizeof(g.sg.pp)); no size of for bit-field
|
|
327
|
|
328 }
|
|
329
|
|
330 // int :12 bit-field cannot be a return value;
|
|
331 // main3( int a:8 ) bit-field cannot be an argument;
|
|
332 main3( int a )
|
|
333 {
|
|
334 // int b:9; // nor local variable
|
338
|
335 int b,i;
|
|
336 i = 7;
|
336
|
337
|
|
338
|
338
|
339 b = g.pte.rpn = -333;
|
|
340 printf("main3-0: %d\n",b);
|
|
341 b = g.pte.rpn--;
|
|
342 printf("main3-1: %d\n",b);
|
|
343 b = g.pte.rpn++;
|
|
344 printf("main3-2: %d\n",b);
|
|
345 b = --g.pte.rpn;
|
|
346 printf("main3-3: %d\n",b);
|
|
347 b = ++g.pte.rpn;
|
|
348 printf("main3-4: %d\n",b);
|
|
349 b = (g.pte.rpn += 3);
|
|
350 printf("main3-5: %d\n",b);
|
|
351 b = (g.pte.rpn -= 3);
|
|
352 printf("main3-6: %d\n",b);
|
|
353 b = (g.pte.rpn *= 3);
|
|
354 printf("main3-7: %d\n",b);
|
|
355 b = (g.pte.rpn /= 3);
|
|
356 printf("main3-8: %d\n",b);
|
|
357 b = (g.pte.rpn %= 3);
|
|
358 printf("main3-9: %d\n",b);
|
|
359 b = (g.pte.rpn |= 3);
|
|
360 printf("main3-10: %d\n",b);
|
|
361 b = (g.pte.rpn &= 3);
|
|
362 printf("main3-12: %d\n",b);
|
|
363 b = (g.pte.rpn ^= 3);
|
|
364 printf("main3-13: %d\n",b);
|
|
365 b = (g.pte.rpn <<= 3);
|
|
366 printf("main3-14: %d\n",b);
|
|
367 b = (g.pte.rpn >>= 3);
|
|
368 printf("main3-15: %d\n",b);
|
|
369
|
|
370 g.pte.rpn = -333;
|
|
371 printf("main3-16: %d\n",b);
|
|
372 b = g.pte.rpn--;
|
|
373 printf("main3-17: %d\n",b);
|
|
374 b = g.pte.rpn++;
|
|
375 printf("main3-18: %d\n",b);
|
|
376 b = --g.pte.rpn;
|
|
377 printf("main3-19: %d\n",b);
|
|
378 b = ++g.pte.rpn;
|
|
379 printf("main3-20: %d\n",b);
|
|
380 b = (g.pte.rpn += i);
|
|
381 printf("main3-21: %d\n",b);
|
|
382 b = (g.pte.rpn -= i);
|
|
383 printf("main3-22: %d\n",b);
|
|
384 b = (g.pte.rpn *= i);
|
|
385 printf("main3-23: %d\n",b);
|
|
386 b = (g.pte.rpn /= i);
|
|
387 printf("main3-24: %d\n",b);
|
|
388 b = (g.pte.rpn %= i);
|
|
389 printf("main3-25: %d\n",b);
|
|
390 b = (g.pte.rpn |= i);
|
|
391 printf("main3-26: %d\n",b);
|
|
392 b = (g.pte.rpn &= i);
|
|
393 printf("main3-27: %d\n",b);
|
|
394 b = (g.pte.rpn ^= i);
|
|
395 printf("main3-28: %d\n",b);
|
|
396 b = (g.pte.rpn <<= i);
|
|
397 printf("main3-29: %d\n",b);
|
|
398 b = (g.pte.rpn >>= i);
|
|
399 printf("main3-30: %d\n",b);
|
336
|
400
|
|
401 return --b;
|
|
402 }
|
|
403
|
338
|
404 main4( int a )
|
|
405 {
|
|
406 // int b:9; // nor local variable
|
|
407 int b,i;
|
|
408 PTE *pg = &g;
|
|
409
|
|
410 i = 7;
|
|
411
|
|
412
|
|
413 pg->pte.rpn = -333;
|
|
414 printf("main4-0: %d\n",b);
|
|
415 b = pg->pte.rpn--;
|
|
416 printf("main4-1: %d\n",b);
|
|
417 b = pg->pte.rpn++;
|
|
418 printf("main4-2: %d\n",b);
|
|
419 b = --pg->pte.rpn;
|
|
420 printf("main4-3: %d\n",b);
|
|
421 b = ++pg->pte.rpn;
|
|
422 printf("main4-4: %d\n",b);
|
|
423 b = (pg->pte.rpn += 3);
|
|
424 printf("main4-5: %d\n",b);
|
|
425 b = (pg->pte.rpn -= 3);
|
|
426 printf("main4-6: %d\n",b);
|
|
427 b = (pg->pte.rpn *= 3);
|
|
428 printf("main4-7: %d\n",b);
|
|
429 b = (pg->pte.rpn /= 3);
|
|
430 printf("main4-8: %d\n",b);
|
|
431 b = (pg->pte.rpn %= 3);
|
|
432 printf("main4-9: %d\n",b);
|
|
433 b = (pg->pte.rpn |= 3);
|
|
434 printf("main4-10: %d\n",b);
|
|
435 b = (pg->pte.rpn &= 3);
|
|
436 printf("main4-12: %d\n",b);
|
|
437 b = (pg->pte.rpn ^= 3);
|
|
438 printf("main4-13: %d\n",b);
|
|
439 b = (pg->pte.rpn <<= 3);
|
|
440 printf("main4-14: %d\n",b);
|
|
441 b = (pg->pte.rpn >>= 3);
|
|
442 printf("main4-15: %d\n",b);
|
|
443
|
|
444 pg->pte.rpn = -333;
|
|
445 printf("main4-16: %d\n",b);
|
|
446 b = pg->pte.rpn--;
|
|
447 printf("main4-17: %d\n",b);
|
|
448 b = pg->pte.rpn++;
|
|
449 printf("main4-18: %d\n",b);
|
|
450 b = --pg->pte.rpn;
|
|
451 printf("main4-19: %d\n",b);
|
|
452 b = ++pg->pte.rpn;
|
|
453 printf("main4-20: %d\n",b);
|
|
454 b = (pg->pte.rpn += i);
|
|
455 printf("main4-21: %d\n",b);
|
|
456 b = (pg->pte.rpn -= i);
|
|
457 printf("main4-22: %d\n",b);
|
|
458 b = (pg->pte.rpn *= i);
|
|
459 printf("main4-23: %d\n",b);
|
|
460 b = (pg->pte.rpn /= i);
|
|
461 printf("main4-24: %d\n",b);
|
|
462 b = (pg->pte.rpn %= i);
|
|
463 printf("main4-25: %d\n",b);
|
|
464 b = (pg->pte.rpn |= i);
|
|
465 printf("main4-26: %d\n",b);
|
|
466 b = (pg->pte.rpn &= i);
|
|
467 printf("main4-27: %d\n",b);
|
|
468 b = (pg->pte.rpn ^= i);
|
|
469 printf("main4-28: %d\n",b);
|
|
470 b = (pg->pte.rpn <<= i);
|
|
471 printf("main4-29: %d\n",b);
|
|
472 b = (pg->pte.rpn >>= i);
|
|
473 printf("main4-30: %d\n",b);
|
|
474
|
|
475 return --b;
|
|
476 }
|
|
477
|
|
478
|
336
|
479
|
|
480
|
|
481
|
|
482 union ll1 {
|
|
483 int a[8];
|
|
484 struct {
|
|
485 char a:4;
|
|
486 long long v:33;
|
|
487 long long w:33;
|
|
488 long long x:33;
|
|
489 } b;
|
|
490 } ll1;
|
|
491
|
|
492 union ll0 {
|
|
493 int a[8];
|
|
494 struct {
|
|
495 char a:4;
|
|
496 long long v:48;
|
|
497 long long w:48;
|
|
498 long long x:48;
|
|
499 } b;
|
|
500 } ll0;
|
|
501
|
|
502
|
|
503 union ll {
|
|
504 int a[8];
|
|
505 struct {
|
|
506 char a:4;
|
|
507 long long v:56;
|
|
508 long long w:56;
|
|
509 long long x:56;
|
|
510 } b;
|
|
511 } ll;
|
|
512
|
|
513 union cc {
|
|
514 int a;
|
|
515 struct {
|
|
516 char a:1;
|
|
517 char b:4;
|
|
518 char c:7;
|
|
519 char d:4;
|
|
520 char e:4;
|
|
521 char f:4;
|
|
522 } b;
|
|
523 } cc;
|
|
524
|
|
525 union ii {
|
|
526 int a;
|
|
527 struct {
|
|
528 int a:1;
|
|
529 int b:4;
|
|
530 int c:4;
|
|
531 int d:4;
|
|
532 int e:4;
|
|
533 int f:4;
|
|
534 } b;
|
|
535 } ii;
|
|
536
|
|
537 int m1 = -1;
|
|
538 int p1 = 1;
|
|
539 int zero = 0;
|
|
540
|
423
|
541 main5c()
|
|
542 {
|
|
543 ii.b.a = -1;
|
|
544 printf("m5c-00:%d\n",ii.b.a);
|
|
545
|
|
546 ll1.b.v = -1;
|
|
547 printf("m5c-01:%llx\n",ll1.b.v);
|
|
548 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
549 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
550 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
551 );
|
|
552 ll1.b.v = 0;
|
|
553 ll1.b.w = -1;
|
|
554 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
555 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
556 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
557 );
|
|
558 ll1.b.w = 0;
|
|
559 ll1.b.x = -1;
|
|
560 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
561 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
562 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
563 );
|
|
564 ll1.b.x = 0;
|
|
565
|
|
566 ll0.b.v = -1;
|
|
567 printf("m5c-01:%llx\n",ll0.b.v);
|
|
568 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
569 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
570 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
571 );
|
|
572 ll0.b.v = 0;
|
|
573 ll0.b.w = -1;
|
|
574 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
575 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
576 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
577 );
|
|
578 ll0.b.w = 0;
|
|
579 ll0.b.x = -1;
|
|
580 printf("m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
581 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
582 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
583 );
|
|
584 ll0.b.x = 0;
|
|
585
|
|
586 ll.b.v = -1;
|
|
587 printf("m5c-1:%llx\n",ll.b.v);
|
|
588 printf("m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
589 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
590 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
591 );
|
|
592 ll.b.v = 0;
|
|
593 ll.b.w = -1;
|
|
594 printf("m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
595 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
596 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
597 );
|
|
598 ll.b.w = 0;
|
|
599 ll.b.x = -1;
|
|
600 printf("m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
601 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
602 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
603 );
|
|
604 ll.b.x = 0;
|
|
605
|
|
606 printf("m5c-char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
|
607 cc.b.a = -1;
|
|
608 printf("m5c-a:%08x\n",cc.a);
|
|
609 cc.b.b = -1;
|
|
610 printf("m5c-b:%08x\n",cc.a);
|
|
611 cc.b.c = -1;
|
|
612 printf("m5c-c:%08x\n",cc.a);
|
|
613 cc.b.d = -1;
|
|
614 printf("m5c-d:%08x\n",cc.a);
|
|
615 cc.b.e = -1;
|
|
616 printf("m5c-e:%08x\n",cc.a);
|
|
617 cc.b.f = -1;
|
|
618 printf("m5c-f:%08x\n",cc.a);
|
|
619 printf("m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
|
620 cc.a = -1;
|
|
621 printf("m5c-f:%08x\n",cc.a);
|
|
622 cc.b.a = 0;
|
|
623 printf("m5c-a:%08x\n",cc.a);
|
|
624 cc.b.b = 0;
|
|
625 printf("m5c-b:%08x\n",cc.a);
|
|
626 cc.b.c = 0;
|
|
627 printf("m5c-c:%08x\n",cc.a);
|
|
628 cc.b.d = 0;
|
|
629 printf("m5c-d:%08x\n",cc.a);
|
|
630 cc.b.e = 0;
|
|
631 printf("m5c-e:%08x\n",cc.a);
|
|
632 cc.b.f = 0;
|
|
633 printf("m5c-f:%08x\n",cc.a);
|
|
634 printf("m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
|
635 cc.a = 0;
|
|
636 printf("m5c-f:%08x\n",cc.a);
|
|
637 cc.b.a = 1;
|
|
638 printf("m5c-a:%08x\n",cc.a);
|
|
639 cc.b.b = 1;
|
|
640 printf("m5c-b:%08x\n",cc.a);
|
|
641 cc.b.c = 1;
|
|
642 printf("m5c-c:%08x\n",cc.a);
|
|
643 cc.b.d = 1;
|
|
644 printf("m5c-d:%08x\n",cc.a);
|
|
645 cc.b.e = 1;
|
|
646 printf("m5c-e:%08x\n",cc.a);
|
|
647 cc.b.f = 1;
|
|
648 printf("m5c-f:%08x\n",cc.a);
|
|
649 printf("m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
|
650 cc.a = -1;
|
|
651 printf("m5c-f:%08x\n",cc.a);
|
|
652 cc.b.a = 1;
|
|
653 printf("m5c-a:%08x\n",cc.a);
|
|
654 cc.b.b = 1;
|
|
655 printf("m5c-b:%08x\n",cc.a);
|
|
656 cc.b.c = 1;
|
|
657 printf("m5c-c:%08x\n",cc.a);
|
|
658 cc.b.d = 1;
|
|
659 printf("m5c-d:%08x\n",cc.a);
|
|
660 cc.b.e = 1;
|
|
661 printf("m5c-e:%08x\n",cc.a);
|
|
662 cc.b.f = 1;
|
|
663 printf("m5c-f:%08x\n",cc.a);
|
|
664 printf("m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
|
665
|
|
666 ii.b.a = -1;
|
|
667 printf("m5c-6:%08x\n",ii.a);
|
|
668 ii.b.d = -1;
|
|
669 printf("m5c-6:%08x\n",ii.a);
|
|
670 printf("m5c-5:%d %d\n",ii.b.a,ii.b.d);
|
|
671 }
|
|
672
|
336
|
673 main5()
|
|
674 {
|
|
675 ii.b.a = -1;
|
|
676 printf("00:%d\n",ii.b.a);
|
|
677
|
|
678 ll1.b.v = m1;
|
|
679 printf("01:%llx\n",ll1.b.v);
|
|
680 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
681 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
682 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
683 );
|
|
684 ll1.b.v = zero;
|
|
685 ll1.b.w = m1;
|
|
686 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
687 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
688 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
689 );
|
|
690 ll1.b.w = zero;
|
|
691 ll1.b.x = m1;
|
|
692 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
693 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
694 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
695 );
|
423
|
696 ll1.b.x = zero;
|
336
|
697
|
|
698 ll0.b.v = m1;
|
|
699 printf("01:%llx\n",ll0.b.v);
|
|
700 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
701 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
702 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
703 );
|
|
704 ll0.b.v = zero;
|
|
705 ll0.b.w = m1;
|
|
706 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
707 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
708 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
709 );
|
|
710 ll0.b.w = zero;
|
|
711 ll0.b.x = m1;
|
|
712 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
713 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
714 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
715 );
|
423
|
716 ll0.b.x = zero;
|
336
|
717
|
|
718 ll.b.v = m1;
|
|
719 printf("1:%llx\n",ll.b.v);
|
|
720 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
721 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
722 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
723 );
|
|
724 ll.b.v = zero;
|
|
725 ll.b.w = m1;
|
|
726 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
727 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
728 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
729 );
|
|
730 ll.b.w = zero;
|
|
731 ll.b.x = m1;
|
|
732 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
|
733 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
734 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
735 );
|
423
|
736 ll.b.x = zero;
|
336
|
737
|
|
738 printf("char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
|
739 cc.b.a = m1;
|
|
740 printf("a:%08x\n",cc.a);
|
|
741 cc.b.b = m1;
|
|
742 printf("b:%08x\n",cc.a);
|
|
743 cc.b.c = m1;
|
|
744 printf("c:%08x\n",cc.a);
|
|
745 cc.b.d = m1;
|
|
746 printf("d:%08x\n",cc.a);
|
|
747 cc.b.e = m1;
|
|
748 printf("e:%08x\n",cc.a);
|
|
749 cc.b.f = m1;
|
|
750 printf("f:%08x\n",cc.a);
|
|
751 printf("3:%d %d\n",cc.b.c,cc.b.d);
|
|
752 cc.a = m1;
|
|
753 printf("f:%08x\n",cc.a);
|
|
754 cc.b.a = zero;
|
|
755 printf("a:%08x\n",cc.a);
|
|
756 cc.b.b = zero;
|
|
757 printf("b:%08x\n",cc.a);
|
|
758 cc.b.c = zero;
|
|
759 printf("c:%08x\n",cc.a);
|
|
760 cc.b.d = zero;
|
|
761 printf("d:%08x\n",cc.a);
|
|
762 cc.b.e = zero;
|
|
763 printf("e:%08x\n",cc.a);
|
|
764 cc.b.f = zero;
|
|
765 printf("f:%08x\n",cc.a);
|
|
766 printf("3:%d %d\n",cc.b.c,cc.b.d);
|
|
767 cc.a = zero;
|
|
768 printf("f:%08x\n",cc.a);
|
|
769 cc.b.a = p1;
|
|
770 printf("a:%08x\n",cc.a);
|
|
771 cc.b.b = p1;
|
|
772 printf("b:%08x\n",cc.a);
|
|
773 cc.b.c = p1;
|
|
774 printf("c:%08x\n",cc.a);
|
|
775 cc.b.d = p1;
|
|
776 printf("d:%08x\n",cc.a);
|
|
777 cc.b.e = p1;
|
|
778 printf("e:%08x\n",cc.a);
|
|
779 cc.b.f = p1;
|
|
780 printf("f:%08x\n",cc.a);
|
|
781 printf("3:%d %d\n",cc.b.c,cc.b.d);
|
|
782 cc.a = m1;
|
|
783 printf("f:%08x\n",cc.a);
|
|
784 cc.b.a = p1;
|
|
785 printf("a:%08x\n",cc.a);
|
|
786 cc.b.b = p1;
|
|
787 printf("b:%08x\n",cc.a);
|
|
788 cc.b.c = p1;
|
|
789 printf("c:%08x\n",cc.a);
|
|
790 cc.b.d = p1;
|
|
791 printf("d:%08x\n",cc.a);
|
|
792 cc.b.e = p1;
|
|
793 printf("e:%08x\n",cc.a);
|
|
794 cc.b.f = p1;
|
|
795 printf("f:%08x\n",cc.a);
|
|
796 printf("3:%d %d\n",cc.b.c,cc.b.d);
|
|
797
|
|
798 ii.b.a = m1;
|
|
799 printf("6:%08x\n",ii.a);
|
|
800 ii.b.d = m1;
|
|
801 printf("6:%08x\n",ii.a);
|
|
802 printf("5:%d %d\n",ii.b.a,ii.b.d);
|
|
803 }
|
|
804
|
|
805
|
338
|
806 main3l( int a )
|
|
807 {
|
|
808 // int b:9; // nor local variable
|
|
809 long long b,i;
|
|
810 i = 7;
|
|
811
|
|
812
|
|
813 g.pte.lpn = -333;
|
|
814 printf("main3l-0: %d\n",b);
|
|
815 b = g.pte.lpn--;
|
|
816 printf("main3l-1: %d\n",b);
|
|
817 b = g.pte.lpn++;
|
|
818 printf("main3l-2: %d\n",b);
|
|
819 b = --g.pte.lpn;
|
|
820 printf("main3l-3: %d\n",b);
|
|
821 b = ++g.pte.lpn;
|
|
822 printf("main3l-4: %d\n",b);
|
|
823 b = (g.pte.lpn += 3);
|
|
824 printf("main3l-5: %d\n",b);
|
|
825 b = (g.pte.lpn -= 3);
|
|
826 printf("main3l-6: %d\n",b);
|
|
827 b = (g.pte.lpn *= 3);
|
|
828 printf("main3l-7: %d\n",b);
|
|
829 b = (g.pte.lpn /= 3);
|
|
830 printf("main3l-8: %d\n",b);
|
|
831 b = (g.pte.lpn %= 3);
|
|
832 printf("main3l-9: %d\n",b);
|
|
833 b = (g.pte.lpn |= 3);
|
|
834 printf("main3l-10: %d\n",b);
|
|
835 b = (g.pte.lpn &= 3);
|
|
836 printf("main3l-12: %d\n",b);
|
|
837 b = (g.pte.lpn ^= 3);
|
|
838 printf("main3l-13: %d\n",b);
|
|
839 b = (g.pte.lpn <<= 3);
|
|
840 printf("main3l-14: %d\n",b);
|
|
841 b = (g.pte.lpn >>= 3);
|
|
842 printf("main3l-15: %d\n",b);
|
|
843
|
|
844 g.pte.lpn = -333;
|
|
845 printf("main3l-16: %d\n",b);
|
|
846 b = g.pte.lpn--;
|
|
847 printf("main3l-17: %d\n",b);
|
|
848 b = g.pte.lpn++;
|
|
849 printf("main3l-18: %d\n",b);
|
|
850 b = --g.pte.lpn;
|
|
851 printf("main3l-19: %d\n",b);
|
|
852 b = ++g.pte.lpn;
|
|
853 printf("main3l-20: %d\n",b);
|
|
854 b = (g.pte.lpn += i);
|
|
855 printf("main3l-21: %d\n",b);
|
|
856 b = (g.pte.lpn -= i);
|
|
857 printf("main3l-22: %d\n",b);
|
|
858 b = (g.pte.lpn *= i);
|
|
859 printf("main3l-23: %d\n",b);
|
|
860 b = (g.pte.lpn /= i);
|
|
861 printf("main3l-24: %d\n",b);
|
|
862 b = (g.pte.lpn %= i);
|
|
863 printf("main3l-25: %d\n",b);
|
|
864 b = (g.pte.lpn |= i);
|
|
865 printf("main3l-26: %d\n",b);
|
|
866 b = (g.pte.lpn &= i);
|
|
867 printf("main3l-27: %d\n",b);
|
|
868 b = (g.pte.lpn ^= i);
|
|
869 printf("main3l-28: %d\n",b);
|
|
870 b = (g.pte.lpn <<= i);
|
|
871 printf("main3l-29: %d\n",b);
|
|
872 b = (g.pte.lpn >>= i);
|
|
873 printf("main3l-30: %d\n",b);
|
|
874
|
|
875 return --b;
|
|
876 }
|
|
877
|
365
|
878
|
|
879 main6()
|
|
880 {
|
|
881 int i =0;
|
|
882 g.pte.api = 0;
|
|
883 printf("main5: %d %d\n",i++,g.pte.api);
|
|
884 g.pte.api = 1;
|
|
885 printf("main5: %d %d\n",i++,g.pte.api);
|
|
886 g.pte.api = 2;
|
|
887 printf("main5: %d %d\n",i++,g.pte.api);
|
|
888 g.pte.api = 3;
|
|
889 printf("main5: %d %d\n",i++,g.pte.api);
|
|
890 g.pte.api = 4;
|
|
891 printf("main5: %d %d\n",i++,g.pte.api);
|
|
892 g.pte.api = 5;
|
|
893 printf("main5: %d %d\n",i++,g.pte.api);
|
|
894 g.pte.api = 6;
|
|
895 printf("main5: %d %d\n",i++,g.pte.api);
|
|
896 g.pte.api = 7;
|
|
897 printf("main5: %d %d\n",i++,g.pte.api);
|
|
898 g.pte.api = 8;
|
|
899 printf("main5: %d %d\n",i++,g.pte.api);
|
|
900 g.pte.api = 9;
|
|
901 printf("main5: %d %d\n",i++,g.pte.api);
|
|
902 g.pte.api = 10;
|
|
903 printf("main5: %d %d\n",i++,g.pte.api);
|
|
904 g.pte.api = 11;
|
|
905 printf("main5: %d %d\n",i++,g.pte.api);
|
|
906 g.pte.api = 12;
|
|
907 printf("main5: %d %d\n",i++,g.pte.api);
|
|
908 g.pte.api = 13;
|
|
909 printf("main5: %d %d\n",i++,g.pte.api);
|
|
910 g.pte.api = 14;
|
|
911 printf("main5: %d %d\n",i++,g.pte.api);
|
|
912 g.pte.api = 15;
|
|
913 printf("main5: %d %d\n",i++,g.pte.api);
|
|
914 g.pte.api = 16;
|
|
915 printf("main5: %d %d\n",i++,g.pte.api);
|
|
916 g.pte.api = 17;
|
|
917 printf("main5: %d %d\n",i++,g.pte.api);
|
|
918 g.pte.api = 18;
|
|
919 printf("main5: %d %d\n",i++,g.pte.api);
|
|
920 g.pte.api = 19;
|
|
921 printf("main5: %d %d\n",i++,g.pte.api);
|
|
922 g.pte.api = 20;
|
|
923 printf("main5: %d %d\n",i++,g.pte.api);
|
|
924 g.pte.api = 21;
|
|
925 printf("main5: %d %d\n",i++,g.pte.api);
|
|
926 g.pte.api = 22;
|
|
927 printf("main5: %d %d\n",i++,g.pte.api);
|
|
928 g.pte.api = 23;
|
|
929 printf("main5: %d %d\n",i++,g.pte.api);
|
|
930 g.pte.api = 24;
|
|
931 printf("main5: %d %d\n",i++,g.pte.api);
|
|
932 g.pte.api = 25;
|
|
933 printf("main5: %d %d\n",i++,g.pte.api);
|
|
934 g.pte.api = 26;
|
|
935 printf("main5: %d %d\n",i++,g.pte.api);
|
|
936 g.pte.api = 27;
|
|
937 printf("main5: %d %d\n",i++,g.pte.api);
|
|
938 g.pte.api = 28;
|
|
939 printf("main5: %d %d\n",i++,g.pte.api);
|
|
940 g.pte.api = 29;
|
|
941 printf("main5: %d %d\n",i++,g.pte.api);
|
|
942 g.pte.api = 30;
|
|
943 printf("main5: %d %d\n",i++,g.pte.api);
|
|
944 g.pte.api = 31;
|
|
945 printf("main5: %d %d\n",i++,g.pte.api);
|
|
946 g.pte.api = 32;
|
|
947 printf("main5: %d %d\n",i++,g.pte.api);
|
|
948 g.pte.api = 33;
|
|
949 printf("main5: %d %d\n",i++,g.pte.api);
|
|
950 g.pte.api = 34;
|
|
951 printf("main5: %d %d\n",i++,g.pte.api);
|
|
952 g.pte.api = 35;
|
|
953 printf("main5: %d %d\n",i++,g.pte.api);
|
|
954 g.pte.api = 36;
|
|
955 printf("main5: %d %d\n",i++,g.pte.api);
|
|
956 g.pte.api = 37;
|
|
957 printf("main5: %d %d\n",i++,g.pte.api);
|
|
958 g.pte.api = 38;
|
|
959 printf("main5: %d %d\n",i++,g.pte.api);
|
|
960 g.pte.api = 39;
|
|
961 printf("main5: %d %d\n",i++,g.pte.api);
|
|
962 g.pte.api = 40;
|
|
963 printf("main5: %d %d\n",i++,g.pte.api);
|
|
964 g.pte.api = 41;
|
|
965 printf("main5: %d %d\n",i++,g.pte.api);
|
|
966 g.pte.api = 42;
|
|
967 printf("main5: %d %d\n",i++,g.pte.api);
|
|
968 g.pte.api = 43;
|
|
969 printf("main5: %d %d\n",i++,g.pte.api);
|
|
970 g.pte.api = 44;
|
|
971 printf("main5: %d %d\n",i++,g.pte.api);
|
|
972 g.pte.api = 45;
|
|
973 printf("main5: %d %d\n",i++,g.pte.api);
|
|
974 g.pte.api = 46;
|
|
975 printf("main5: %d %d\n",i++,g.pte.api);
|
|
976 g.pte.api = 47;
|
|
977 printf("main5: %d %d\n",i++,g.pte.api);
|
|
978 g.pte.api = 48;
|
|
979 printf("main5: %d %d\n",i++,g.pte.api);
|
|
980 g.pte.api = 49;
|
|
981 printf("main5: %d %d\n",i++,g.pte.api);
|
|
982 g.pte.api = 50;
|
|
983 printf("main5: %d %d\n",i++,g.pte.api);
|
|
984 g.pte.api = 51;
|
|
985 printf("main5: %d %d\n",i++,g.pte.api);
|
|
986 g.pte.api = 52;
|
|
987 printf("main5: %d %d\n",i++,g.pte.api);
|
|
988 g.pte.api = 53;
|
|
989 printf("main5: %d %d\n",i++,g.pte.api);
|
|
990 g.pte.api = 54;
|
|
991 printf("main5: %d %d\n",i++,g.pte.api);
|
|
992 g.pte.api = 55;
|
|
993 printf("main5: %d %d\n",i++,g.pte.api);
|
|
994 g.pte.api = 56;
|
|
995 printf("main5: %d %d\n",i++,g.pte.api);
|
|
996 g.pte.api = 57;
|
|
997 printf("main5: %d %d\n",i++,g.pte.api);
|
|
998 g.pte.api = 58;
|
|
999 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1000 g.pte.api = 59;
|
|
1001 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1002 g.pte.api = 60;
|
|
1003 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1004 g.pte.api = 61;
|
|
1005 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1006 g.pte.api = 62;
|
|
1007 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1008 g.pte.api = 63;
|
|
1009 printf("main5: %d %d\n",i++,g.pte.api);
|
|
1010 }
|
|
1011
|
|
1012 main7()
|
|
1013 {
|
|
1014 int i;
|
|
1015 for (i=-2;i<2;i++) {
|
|
1016 g.pte.api = i;
|
|
1017 if (g.pte.api) {
|
|
1018 printf("main 7:1 %d yes\n",i);
|
|
1019 } else {
|
|
1020 printf("main 7:1 %d no\n",i);
|
|
1021 }
|
|
1022 if (g.pte.api==1) {
|
|
1023 printf("main 7:2 %d yes\n",i);
|
|
1024 } else {
|
|
1025 printf("main 7:2 %d no\n",i);
|
|
1026 }
|
|
1027 if (g.pte.api==-1) {
|
|
1028 printf("main 7:3 %d yes\n",i);
|
|
1029 } else {
|
|
1030 printf("main 7:3 %d no\n",i);
|
|
1031 }
|
|
1032 }
|
|
1033 for (i=-2;i<2;i++) {
|
|
1034 g.sg.v = i;
|
|
1035 if (g.sg.v) {
|
|
1036 printf("main 7:4 %d yes\n",i);
|
|
1037 } else {
|
|
1038 printf("main 7:4 %d no\n",i);
|
|
1039 }
|
|
1040 if (g.sg.v==1) {
|
|
1041 printf("main 7:5 %d yes\n",i);
|
|
1042 } else {
|
|
1043 printf("main 7:5 %d no\n",i);
|
|
1044 }
|
|
1045 if (g.sg.v==-1) {
|
|
1046 printf("main 7:6 %d yes\n",i);
|
|
1047 } else {
|
|
1048 printf("main 7:6 %d no\n",i);
|
|
1049 }
|
|
1050 }
|
|
1051 }
|
|
1052
|
|
1053 /* end */
|