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;
|
427
|
52 printf("#0051:% 3d: %d\n",i++,j);
|
336
|
53 a.pte.c = 1;
|
|
54 j = a.pte.c;
|
427
|
55 printf("#0054:% 3d: %d\n",i++,j);
|
336
|
56 a.pte.pp = -1;
|
|
57 j = a.pte.pp;
|
427
|
58 printf("#0057:% 3d: %d\n",i++,j);
|
336
|
59 a.sg.pp = -1;
|
|
60 j = a.sg.pp;
|
427
|
61 printf("#0060:% 3d: %d\n",i++,j);
|
336
|
62
|
|
63 p = &g;
|
|
64
|
|
65 g.u[0]=0;
|
|
66 g.u[1]=0;
|
|
67
|
427
|
68 printf("#0067:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
69 g.pte. v = 3;
|
427
|
70 printf("#0069:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
71 g.pte. vsid = -1;
|
427
|
72 printf("#0071:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
73 g.pte. h = 3;
|
427
|
74 printf("#0073:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
75 g.pte. api = 3;
|
427
|
76 printf("#0075:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
77 g.pte. rpn = 3;
|
427
|
78 printf("#0077:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
79
|
|
80 g.pte. r = 3;
|
427
|
81 printf("#0080:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
82 g.pte. c = 3;
|
427
|
83 printf("#0082:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
84 g.pte. w = 3;
|
427
|
85 printf("#0084:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
86 g.pte. i = 3;
|
427
|
87 printf("#0086:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
88 g.pte. m = 3;
|
427
|
89 printf("#0088:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
90 g.pte. g = 3;
|
427
|
91 printf("#0090:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
92 g.pte. pp = 3;
|
427
|
93 printf("#0092:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
94
|
|
95 g.u[0]=-1;
|
|
96 g.u[1]=-1;
|
|
97
|
427
|
98 printf("#0097:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
99 g.pte. v = 0;
|
427
|
100 printf("#0099:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
101 g.pte. vsid = 0;
|
427
|
102 printf("#0101:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
103 g.pte. h = 0;
|
427
|
104 printf("#0103:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
105 g.pte. api = 0;
|
427
|
106 printf("#0105:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
107 g.pte. rpn = 0;
|
427
|
108 printf("#0107:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
109
|
|
110 g.pte. r = 0;
|
427
|
111 printf("#0110:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
112 g.pte. c = 0;
|
427
|
113 printf("#0112:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
114 g.pte. w = 0;
|
427
|
115 printf("#0114:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
116 g.pte. i = 0;
|
427
|
117 printf("#0116:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
118 g.pte. m = 0;
|
427
|
119 printf("#0118:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
120 g.pte. g = 0;
|
427
|
121 printf("#0120:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
122 g.pte. pp = 0;
|
427
|
123 printf("#0122:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
124
|
|
125 g.u[0]=-1;
|
|
126 g.u[1]=-1;
|
|
127
|
427
|
128 printf("#0127:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
129 g.pte. v = 0x5555555;
|
427
|
130 printf("#0129:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
131 g.pte. vsid = 0x5555555;
|
427
|
132 printf("#0131:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
133 g.pte. h = 0x5555555;
|
427
|
134 printf("#0133:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
135 g.pte. api = 0x5555555;
|
427
|
136 printf("#0135:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
137 g.pte. rpn = 0x5555555;
|
427
|
138 printf("#0137:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
139
|
|
140 g.pte. r = 0x5555555;
|
427
|
141 printf("#0140:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
142 g.pte. c = 0x5555555;
|
427
|
143 printf("#0142:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
144 g.pte. w = 0x5555555;
|
427
|
145 printf("#0144:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
146 g.pte. i = 0x5555555;
|
427
|
147 printf("#0146:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
148 g.pte. m = 0x5555555;
|
427
|
149 printf("#0148:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
150 g.pte. g = 0x5555555;
|
427
|
151 printf("#0150:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
152 g.pte. pp = 0x5555555;
|
427
|
153 printf("#0152:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
154
|
|
155 g.u[0]=-1;
|
|
156 g.u[1]=-1;
|
|
157
|
|
158 for(i=0;i<0x200;i++) {
|
427
|
159 printf("#0158:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
160 g.pte. v = i;
|
427
|
161 printf("#0160:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
162 g.pte. vsid = i;
|
427
|
163 printf("#0162:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
164 g.pte. h = i;
|
427
|
165 printf("#0164:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
166 g.pte. api = i;
|
427
|
167 printf("#0166:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
168 g.pte. rpn = i;
|
427
|
169 printf("#0168:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
170
|
|
171 g.pte. r = i;
|
427
|
172 printf("#0171:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
173 g.pte. c = i;
|
427
|
174 printf("#0173:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
175 g.pte. w = i;
|
427
|
176 printf("#0175:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
177 g.pte. i = i;
|
427
|
178 printf("#0177:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
179 g.pte. m = i;
|
427
|
180 printf("#0179:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
181 g.pte. g = i;
|
427
|
182 printf("#0181:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
183 g.pte. pp = i;
|
427
|
184 printf("#0183:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
185 }
|
|
186
|
|
187 g = a;
|
|
188
|
427
|
189 printf("#0188:%d %d %d\n",a.pte.pp,g.pte.pp,p->pte.pp);
|
336
|
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
|
427
|
207 printf("#0206:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
208 g.sg. v = 3;
|
427
|
209 printf("#0208:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
210 g.sg. vsid = -1;
|
427
|
211 printf("#0210:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
212 g.sg. h = 3;
|
427
|
213 printf("#0212:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
214 g.sg. api = 3;
|
427
|
215 printf("#0214:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
216 g.sg. rpn = 3;
|
427
|
217 printf("#0216:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
218
|
|
219 g.sg. r = 3;
|
427
|
220 printf("#0219:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
221 g.sg. c = 3;
|
427
|
222 printf("#0221:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
223 g.sg. w = 3;
|
427
|
224 printf("#0223:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
225 g.sg. i = 3;
|
427
|
226 printf("#0225:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
227 g.sg. m = 3;
|
427
|
228 printf("#0227:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
229 g.sg. g = 3;
|
427
|
230 printf("#0229:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
231 g.sg. pp = 3;
|
427
|
232 printf("#0231:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
233
|
|
234 g.u[0]=-1;
|
|
235 g.u[1]=-1;
|
|
236
|
427
|
237 printf("#0236:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
238 g.sg. v = 0;
|
427
|
239 printf("#0238:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
240 g.sg. vsid = 0;
|
427
|
241 printf("#0240:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
242 g.sg. h = 0;
|
427
|
243 printf("#0242:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
244 g.sg. api = 0;
|
427
|
245 printf("#0244:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
246 g.sg. rpn = 0;
|
427
|
247 printf("#0246:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
248
|
|
249 g.sg. r = 0;
|
427
|
250 printf("#0249:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
251 g.sg. c = 0;
|
427
|
252 printf("#0251:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
253 g.sg. w = 0;
|
427
|
254 printf("#0253:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
255 g.sg. i = 0;
|
427
|
256 printf("#0255:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
257 g.sg. m = 0;
|
427
|
258 printf("#0257:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
259 g.sg. g = 0;
|
427
|
260 printf("#0259:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
261 g.sg. pp = 0;
|
427
|
262 printf("#0261:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
263
|
|
264 g.u[0]=-1;
|
|
265 g.u[1]=-1;
|
|
266
|
427
|
267 printf("#0266:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
268 g.sg. v = 0x55;
|
427
|
269 printf("#0268:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
270 g.sg. vsid = 0x5555555;
|
427
|
271 printf("#0270:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
272 g.sg. h = 0x5555555;
|
427
|
273 printf("#0272:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
274 g.sg. api = 0x55;
|
427
|
275 printf("#0274:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
276 g.sg. rpn = 0x5555555;
|
427
|
277 printf("#0276:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
278
|
|
279 g.sg. r = 0x5555555;
|
427
|
280 printf("#0279:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
281 g.sg. c = 0x5555555;
|
427
|
282 printf("#0281:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
283 g.sg. w = 0x5555555;
|
427
|
284 printf("#0283:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
285 g.sg. i = 0x5555555;
|
427
|
286 printf("#0285:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
287 g.sg. m = 0x5555555;
|
427
|
288 printf("#0287:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
289 g.sg. g = 0x5555555;
|
427
|
290 printf("#0289:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
291 g.sg. pp = 0x5555555;
|
427
|
292 printf("#0291:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
293
|
|
294 g.u[0]=-1;
|
|
295 g.u[1]=-1;
|
|
296
|
|
297 for(i=-0x100;i<0x100;i++) {
|
427
|
298 printf("#0297:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
299 g.sg. v = i;
|
427
|
300 printf("#0299:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
301 g.sg. vsid = i;
|
427
|
302 printf("#0301:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
303 g.sg. h = i;
|
427
|
304 printf("#0303:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
305 g.sg. api = i;
|
427
|
306 printf("#0305:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
307 g.sg. rpn = i;
|
427
|
308 printf("#0307:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
309
|
|
310 g.sg. r = i;
|
427
|
311 printf("#0310:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
312 g.sg. c = i;
|
427
|
313 printf("#0312:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
314 g.sg. w = i;
|
427
|
315 printf("#0314:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
316 g.sg. i = i;
|
427
|
317 printf("#0316:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
318 g.sg. m = i;
|
427
|
319 printf("#0318:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
320 g.sg. g = i;
|
427
|
321 printf("#0320:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
322 g.sg. pp = i;
|
427
|
323 printf("#0322:% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
|
336
|
324 }
|
|
325
|
427
|
326 // printf("#0325:size of %d\n",sizeof(g.sg.pp)); no size of for bit-field
|
336
|
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;
|
427
|
340 printf("#0339:main3-0: %d\n",b);
|
338
|
341 b = g.pte.rpn--;
|
427
|
342 printf("#0341:main3-1: %d\n",b);
|
338
|
343 b = g.pte.rpn++;
|
427
|
344 printf("#0343:main3-2: %d\n",b);
|
338
|
345 b = --g.pte.rpn;
|
427
|
346 printf("#0345:main3-3: %d\n",b);
|
338
|
347 b = ++g.pte.rpn;
|
427
|
348 printf("#0347:main3-4: %d\n",b);
|
338
|
349 b = (g.pte.rpn += 3);
|
427
|
350 printf("#0349:main3-5: %d\n",b);
|
338
|
351 b = (g.pte.rpn -= 3);
|
427
|
352 printf("#0351:main3-6: %d\n",b);
|
338
|
353 b = (g.pte.rpn *= 3);
|
427
|
354 printf("#0353:main3-7: %d\n",b);
|
338
|
355 b = (g.pte.rpn /= 3);
|
427
|
356 printf("#0355:main3-8: %d\n",b);
|
338
|
357 b = (g.pte.rpn %= 3);
|
427
|
358 printf("#0357:main3-9: %d\n",b);
|
338
|
359 b = (g.pte.rpn |= 3);
|
427
|
360 printf("#0359:main3-10: %d\n",b);
|
338
|
361 b = (g.pte.rpn &= 3);
|
427
|
362 printf("#0361:main3-12: %d\n",b);
|
338
|
363 b = (g.pte.rpn ^= 3);
|
427
|
364 printf("#0363:main3-13: %d\n",b);
|
338
|
365 b = (g.pte.rpn <<= 3);
|
427
|
366 printf("#0365:main3-14: %d\n",b);
|
338
|
367 b = (g.pte.rpn >>= 3);
|
427
|
368 printf("#0367:main3-15: %d\n",b);
|
338
|
369
|
|
370 g.pte.rpn = -333;
|
427
|
371 printf("#0370:main3-16: %d\n",b);
|
338
|
372 b = g.pte.rpn--;
|
427
|
373 printf("#0372:main3-17: %d\n",b);
|
338
|
374 b = g.pte.rpn++;
|
427
|
375 printf("#0374:main3-18: %d\n",b);
|
338
|
376 b = --g.pte.rpn;
|
427
|
377 printf("#0376:main3-19: %d\n",b);
|
338
|
378 b = ++g.pte.rpn;
|
427
|
379 printf("#0378:main3-20: %d\n",b);
|
338
|
380 b = (g.pte.rpn += i);
|
427
|
381 printf("#0380:main3-21: %d\n",b);
|
338
|
382 b = (g.pte.rpn -= i);
|
427
|
383 printf("#0382:main3-22: %d\n",b);
|
338
|
384 b = (g.pte.rpn *= i);
|
427
|
385 printf("#0384:main3-23: %d\n",b);
|
338
|
386 b = (g.pte.rpn /= i);
|
427
|
387 printf("#0386:main3-24: %d\n",b);
|
338
|
388 b = (g.pte.rpn %= i);
|
427
|
389 printf("#0388:main3-25: %d\n",b);
|
338
|
390 b = (g.pte.rpn |= i);
|
427
|
391 printf("#0390:main3-26: %d\n",b);
|
338
|
392 b = (g.pte.rpn &= i);
|
427
|
393 printf("#0392:main3-27: %d\n",b);
|
338
|
394 b = (g.pte.rpn ^= i);
|
427
|
395 printf("#0394:main3-28: %d\n",b);
|
338
|
396 b = (g.pte.rpn <<= i);
|
427
|
397 printf("#0396:main3-29: %d\n",b);
|
338
|
398 b = (g.pte.rpn >>= i);
|
427
|
399 printf("#0398: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;
|
427
|
414 printf("#0413:main4-0: %d\n",b);
|
338
|
415 b = pg->pte.rpn--;
|
427
|
416 printf("#0415:main4-1: %d\n",b);
|
338
|
417 b = pg->pte.rpn++;
|
427
|
418 printf("#0417:main4-2: %d\n",b);
|
338
|
419 b = --pg->pte.rpn;
|
427
|
420 printf("#0419:main4-3: %d\n",b);
|
338
|
421 b = ++pg->pte.rpn;
|
427
|
422 printf("#0421:main4-4: %d\n",b);
|
338
|
423 b = (pg->pte.rpn += 3);
|
427
|
424 printf("#0423:main4-5: %d\n",b);
|
338
|
425 b = (pg->pte.rpn -= 3);
|
427
|
426 printf("#0425:main4-6: %d\n",b);
|
338
|
427 b = (pg->pte.rpn *= 3);
|
427
|
428 printf("#0427:main4-7: %d\n",b);
|
338
|
429 b = (pg->pte.rpn /= 3);
|
427
|
430 printf("#0429:main4-8: %d\n",b);
|
338
|
431 b = (pg->pte.rpn %= 3);
|
427
|
432 printf("#0431:main4-9: %d\n",b);
|
338
|
433 b = (pg->pte.rpn |= 3);
|
427
|
434 printf("#0433:main4-10: %d\n",b);
|
338
|
435 b = (pg->pte.rpn &= 3);
|
427
|
436 printf("#0435:main4-12: %d\n",b);
|
338
|
437 b = (pg->pte.rpn ^= 3);
|
427
|
438 printf("#0437:main4-13: %d\n",b);
|
338
|
439 b = (pg->pte.rpn <<= 3);
|
427
|
440 printf("#0439:main4-14: %d\n",b);
|
338
|
441 b = (pg->pte.rpn >>= 3);
|
427
|
442 printf("#0441:main4-15: %d\n",b);
|
338
|
443
|
|
444 pg->pte.rpn = -333;
|
427
|
445 printf("#0444:main4-16: %d\n",b);
|
338
|
446 b = pg->pte.rpn--;
|
427
|
447 printf("#0446:main4-17: %d\n",b);
|
338
|
448 b = pg->pte.rpn++;
|
427
|
449 printf("#0448:main4-18: %d\n",b);
|
338
|
450 b = --pg->pte.rpn;
|
427
|
451 printf("#0450:main4-19: %d\n",b);
|
338
|
452 b = ++pg->pte.rpn;
|
427
|
453 printf("#0452:main4-20: %d\n",b);
|
338
|
454 b = (pg->pte.rpn += i);
|
427
|
455 printf("#0454:main4-21: %d\n",b);
|
338
|
456 b = (pg->pte.rpn -= i);
|
427
|
457 printf("#0456:main4-22: %d\n",b);
|
338
|
458 b = (pg->pte.rpn *= i);
|
427
|
459 printf("#0458:main4-23: %d\n",b);
|
338
|
460 b = (pg->pte.rpn /= i);
|
427
|
461 printf("#0460:main4-24: %d\n",b);
|
338
|
462 b = (pg->pte.rpn %= i);
|
427
|
463 printf("#0462:main4-25: %d\n",b);
|
338
|
464 b = (pg->pte.rpn |= i);
|
427
|
465 printf("#0464:main4-26: %d\n",b);
|
338
|
466 b = (pg->pte.rpn &= i);
|
427
|
467 printf("#0466:main4-27: %d\n",b);
|
338
|
468 b = (pg->pte.rpn ^= i);
|
427
|
469 printf("#0468:main4-28: %d\n",b);
|
338
|
470 b = (pg->pte.rpn <<= i);
|
427
|
471 printf("#0470:main4-29: %d\n",b);
|
338
|
472 b = (pg->pte.rpn >>= i);
|
427
|
473 printf("#0472:main4-30: %d\n",b);
|
338
|
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
|
424
|
537 long long m1 = 0x123456789abcdefLL;
|
336
|
538 int p1 = 1;
|
|
539 int zero = 0;
|
|
540
|
423
|
541 main5c()
|
|
542 {
|
|
543 ii.b.a = -1;
|
427
|
544 printf("#0543:m5c-00:%d\n",ii.b.a);
|
423
|
545
|
424
|
546 ll1.b.v = 0x123456789abcdefLL;
|
427
|
547 printf("#0546:m5c-01:%llx\n",ll1.b.v);
|
|
548 printf("#0547:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
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;
|
427
|
553 printf("#0552:m5c-01:%llx\n",
|
424
|
554 ll1.b.w = 0x123456789abcdefLL);
|
427
|
555 printf("#0554:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
556 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
557 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
558 );
|
|
559 ll1.b.w = 0;
|
427
|
560 printf("#0559:m5c-01:%llx\n",
|
424
|
561 ll1.b.x = 0x123456789abcdefLL);
|
427
|
562 printf("#0561:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
563 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
564 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
565 );
|
|
566 ll1.b.x = 0;
|
|
567
|
427
|
568 printf("#0567:m5c-01:%llx\n",
|
424
|
569 ll0.b.v = 0x123456789abcdefLL);
|
427
|
570 printf("#0569:m5c-01:%llx\n",ll0.b.v);
|
|
571 printf("#0570:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
572 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
573 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
574 );
|
|
575 ll0.b.v = 0;
|
427
|
576 printf("#0575:m5c-01:%llx\n",
|
424
|
577 ll0.b.w = 0x123456789abcdefLL);
|
427
|
578 printf("#0577:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
579 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
580 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
581 );
|
|
582 ll0.b.w = 0;
|
427
|
583 printf("#0582:m5c-01:%llx\n",
|
424
|
584 ll0.b.x = 0x123456789abcdefLL);
|
427
|
585 printf("#0584:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
586 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
587 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
588 );
|
|
589 ll0.b.x = 0;
|
|
590
|
427
|
591 printf("#0590:m5c-01:%llx\n",
|
424
|
592 ll.b.v = 0x123456789abcdefLL);
|
427
|
593 printf("#0592:m5c-1:%llx\n",ll.b.v);
|
|
594 printf("#0593:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
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.v = 0;
|
427
|
599 printf("#0598:m5c-01:%llx\n",
|
424
|
600 ll.b.w = 0x123456789abcdefLL);
|
427
|
601 printf("#0600:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
602 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
603 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
604 );
|
|
605 ll.b.w = 0;
|
427
|
606 printf("#0605:m5c-01:%llx\n",
|
424
|
607 ll.b.x = 0x123456789abcdefLL);
|
427
|
608 printf("#0607:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
423
|
609 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
610 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
611 );
|
|
612 ll.b.x = 0;
|
|
613
|
427
|
614 printf("#0613:m5c-char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
424
|
615 cc.a = 0;
|
423
|
616 cc.b.a = -1;
|
427
|
617 printf("#0616:m5c-a:%08x\n",cc.a);
|
423
|
618 cc.b.b = -1;
|
427
|
619 printf("#0618:m5c-b:%08x\n",cc.a);
|
423
|
620 cc.b.c = -1;
|
427
|
621 printf("#0620:m5c-c:%08x\n",cc.a);
|
423
|
622 cc.b.d = -1;
|
427
|
623 printf("#0622:m5c-d:%08x\n",cc.a);
|
423
|
624 cc.b.e = -1;
|
427
|
625 printf("#0624:m5c-e:%08x\n",cc.a);
|
423
|
626 cc.b.f = -1;
|
427
|
627 printf("#0626:m5c-f:%08x\n",cc.a);
|
|
628 printf("#0627:m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
423
|
629 cc.a = -1;
|
427
|
630 printf("#0629:m5c-f:%08x\n",cc.a);
|
423
|
631 cc.b.a = 0;
|
427
|
632 printf("#0631:m5c-a:%08x\n",cc.a);
|
423
|
633 cc.b.b = 0;
|
427
|
634 printf("#0633:m5c-b:%08x\n",cc.a);
|
423
|
635 cc.b.c = 0;
|
427
|
636 printf("#0635:m5c-c:%08x\n",cc.a);
|
423
|
637 cc.b.d = 0;
|
427
|
638 printf("#0637:m5c-d:%08x\n",cc.a);
|
423
|
639 cc.b.e = 0;
|
427
|
640 printf("#0639:m5c-e:%08x\n",cc.a);
|
423
|
641 cc.b.f = 0;
|
427
|
642 printf("#0641:m5c-f:%08x\n",cc.a);
|
|
643 printf("#0642:m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
423
|
644 cc.a = 0;
|
427
|
645 printf("#0644:m5c-f:%08x\n",cc.a);
|
423
|
646 cc.b.a = 1;
|
427
|
647 printf("#0646:m5c-a:%08x\n",cc.a);
|
423
|
648 cc.b.b = 1;
|
427
|
649 printf("#0648:m5c-b:%08x\n",cc.a);
|
423
|
650 cc.b.c = 1;
|
427
|
651 printf("#0650:m5c-c:%08x\n",cc.a);
|
423
|
652 cc.b.d = 1;
|
427
|
653 printf("#0652:m5c-d:%08x\n",cc.a);
|
423
|
654 cc.b.e = 1;
|
427
|
655 printf("#0654:m5c-e:%08x\n",cc.a);
|
423
|
656 cc.b.f = 1;
|
427
|
657 printf("#0656:m5c-f:%08x\n",cc.a);
|
|
658 printf("#0657:m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
423
|
659 cc.a = -1;
|
427
|
660 printf("#0659:m5c-f:%08x\n",cc.a);
|
423
|
661 cc.b.a = 1;
|
427
|
662 printf("#0661:m5c-a:%08x\n",cc.a);
|
423
|
663 cc.b.b = 1;
|
427
|
664 printf("#0663:m5c-b:%08x\n",cc.a);
|
423
|
665 cc.b.c = 1;
|
427
|
666 printf("#0665:m5c-c:%08x\n",cc.a);
|
423
|
667 cc.b.d = 1;
|
427
|
668 printf("#0667:m5c-d:%08x\n",cc.a);
|
423
|
669 cc.b.e = 1;
|
427
|
670 printf("#0669:m5c-e:%08x\n",cc.a);
|
423
|
671 cc.b.f = 1;
|
427
|
672 printf("#0671:m5c-f:%08x\n",cc.a);
|
|
673 printf("#0672:m5c-3:%d %d\n",cc.b.c,cc.b.d);
|
423
|
674
|
|
675 ii.b.a = -1;
|
427
|
676 printf("#0675:m5c-6:%08x\n",ii.a);
|
423
|
677 ii.b.d = -1;
|
427
|
678 printf("#0677:m5c-6:%08x\n",ii.a);
|
|
679 printf("#0678:m5c-5:%d %d\n",ii.b.a,ii.b.d);
|
423
|
680 }
|
|
681
|
336
|
682 main5()
|
|
683 {
|
|
684 ii.b.a = -1;
|
427
|
685 printf("#0684:00:%d\n",ii.b.a);
|
336
|
686
|
|
687 ll1.b.v = m1;
|
427
|
688 printf("#0687:01:%llx\n",ll1.b.v);
|
|
689 printf("#0688:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
690 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
691 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
692 );
|
|
693 ll1.b.v = zero;
|
|
694 ll1.b.w = m1;
|
427
|
695 printf("#0694:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
696 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
697 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
698 );
|
|
699 ll1.b.w = zero;
|
|
700 ll1.b.x = m1;
|
427
|
701 printf("#0700:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
702 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
|
|
703 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
|
|
704 );
|
423
|
705 ll1.b.x = zero;
|
336
|
706
|
|
707 ll0.b.v = m1;
|
427
|
708 printf("#0707:01:%llx\n",ll0.b.v);
|
|
709 printf("#0708:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
710 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
711 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
712 );
|
|
713 ll0.b.v = zero;
|
|
714 ll0.b.w = m1;
|
427
|
715 printf("#0714:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
716 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
717 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
718 );
|
|
719 ll0.b.w = zero;
|
|
720 ll0.b.x = m1;
|
427
|
721 printf("#0720:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
722 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
|
|
723 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
|
|
724 );
|
423
|
725 ll0.b.x = zero;
|
336
|
726
|
|
727 ll.b.v = m1;
|
427
|
728 printf("#0727:1:%llx\n",ll.b.v);
|
|
729 printf("#0728:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
730 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
731 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
732 );
|
|
733 ll.b.v = zero;
|
|
734 ll.b.w = m1;
|
427
|
735 printf("#0734:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
736 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
737 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
738 );
|
|
739 ll.b.w = zero;
|
|
740 ll.b.x = m1;
|
427
|
741 printf("#0740:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
742 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
743 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
744 );
|
423
|
745 ll.b.x = zero;
|
336
|
746
|
424
|
747 cc.a = zero;
|
427
|
748 printf("#0747:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
336
|
749 cc.b.a = m1;
|
427
|
750 printf("#0749:a:%08x\n",cc.a);
|
336
|
751 cc.b.b = m1;
|
427
|
752 printf("#0751:b:%08x\n",cc.a);
|
336
|
753 cc.b.c = m1;
|
427
|
754 printf("#0753:c:%08x\n",cc.a);
|
336
|
755 cc.b.d = m1;
|
427
|
756 printf("#0755:d:%08x\n",cc.a);
|
336
|
757 cc.b.e = m1;
|
427
|
758 printf("#0757:e:%08x\n",cc.a);
|
336
|
759 cc.b.f = m1;
|
427
|
760 printf("#0759:f:%08x\n",cc.a);
|
|
761 printf("#0760:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
762 cc.a = m1;
|
427
|
763 printf("#0762:f:%08x\n",cc.a);
|
336
|
764 cc.b.a = zero;
|
427
|
765 printf("#0764:a:%08x\n",cc.a);
|
336
|
766 cc.b.b = zero;
|
427
|
767 printf("#0766:b:%08x\n",cc.a);
|
336
|
768 cc.b.c = zero;
|
427
|
769 printf("#0768:c:%08x\n",cc.a);
|
336
|
770 cc.b.d = zero;
|
427
|
771 printf("#0770:d:%08x\n",cc.a);
|
336
|
772 cc.b.e = zero;
|
427
|
773 printf("#0772:e:%08x\n",cc.a);
|
336
|
774 cc.b.f = zero;
|
427
|
775 printf("#0774:f:%08x\n",cc.a);
|
|
776 printf("#0775:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
777 cc.a = zero;
|
427
|
778 printf("#0777:f:%08x\n",cc.a);
|
336
|
779 cc.b.a = p1;
|
427
|
780 printf("#0779:a:%08x\n",cc.a);
|
336
|
781 cc.b.b = p1;
|
427
|
782 printf("#0781:b:%08x\n",cc.a);
|
336
|
783 cc.b.c = p1;
|
427
|
784 printf("#0783:c:%08x\n",cc.a);
|
336
|
785 cc.b.d = p1;
|
427
|
786 printf("#0785:d:%08x\n",cc.a);
|
336
|
787 cc.b.e = p1;
|
427
|
788 printf("#0787:e:%08x\n",cc.a);
|
336
|
789 cc.b.f = p1;
|
427
|
790 printf("#0789:f:%08x\n",cc.a);
|
|
791 printf("#0790:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
792 cc.a = m1;
|
427
|
793 printf("#0792:f:%08x\n",cc.a);
|
336
|
794 cc.b.a = p1;
|
427
|
795 printf("#0794:a:%08x\n",cc.a);
|
336
|
796 cc.b.b = p1;
|
427
|
797 printf("#0796:b:%08x\n",cc.a);
|
336
|
798 cc.b.c = p1;
|
427
|
799 printf("#0798:c:%08x\n",cc.a);
|
336
|
800 cc.b.d = p1;
|
427
|
801 printf("#0800:d:%08x\n",cc.a);
|
336
|
802 cc.b.e = p1;
|
427
|
803 printf("#0802:e:%08x\n",cc.a);
|
336
|
804 cc.b.f = p1;
|
427
|
805 printf("#0804:f:%08x\n",cc.a);
|
|
806 printf("#0805:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
807
|
|
808 ii.b.a = m1;
|
427
|
809 printf("#0808:6:%08x\n",ii.a);
|
336
|
810 ii.b.d = m1;
|
427
|
811 printf("#0810:6:%08x\n",ii.a);
|
|
812 printf("#0811:5:%d %d\n",ii.b.a,ii.b.d);
|
336
|
813 }
|
|
814
|
|
815
|
338
|
816 main3l( int a )
|
|
817 {
|
|
818 // int b:9; // nor local variable
|
|
819 long long b,i;
|
|
820 i = 7;
|
|
821
|
|
822
|
|
823 g.pte.lpn = -333;
|
427
|
824 printf("#0823:main3l-0: %d\n",b);
|
338
|
825 b = g.pte.lpn--;
|
427
|
826 printf("#0825:main3l-1: %d\n",b);
|
338
|
827 b = g.pte.lpn++;
|
427
|
828 printf("#0827:main3l-2: %d\n",b);
|
338
|
829 b = --g.pte.lpn;
|
427
|
830 printf("#0829:main3l-3: %d\n",b);
|
338
|
831 b = ++g.pte.lpn;
|
427
|
832 printf("#0831:main3l-4: %d\n",b);
|
338
|
833 b = (g.pte.lpn += 3);
|
427
|
834 printf("#0833:main3l-5: %d\n",b);
|
338
|
835 b = (g.pte.lpn -= 3);
|
427
|
836 printf("#0835:main3l-6: %d\n",b);
|
338
|
837 b = (g.pte.lpn *= 3);
|
427
|
838 printf("#0837:main3l-7: %d\n",b);
|
338
|
839 b = (g.pte.lpn /= 3);
|
427
|
840 printf("#0839:main3l-8: %d\n",b);
|
338
|
841 b = (g.pte.lpn %= 3);
|
427
|
842 printf("#0841:main3l-9: %d\n",b);
|
338
|
843 b = (g.pte.lpn |= 3);
|
427
|
844 printf("#0843:main3l-10: %d\n",b);
|
338
|
845 b = (g.pte.lpn &= 3);
|
427
|
846 printf("#0845:main3l-12: %d\n",b);
|
338
|
847 b = (g.pte.lpn ^= 3);
|
427
|
848 printf("#0847:main3l-13: %d\n",b);
|
338
|
849 b = (g.pte.lpn <<= 3);
|
427
|
850 printf("#0849:main3l-14: %d\n",b);
|
338
|
851 b = (g.pte.lpn >>= 3);
|
427
|
852 printf("#0851:main3l-15: %d\n",b);
|
338
|
853
|
|
854 g.pte.lpn = -333;
|
427
|
855 printf("#0854:main3l-16: %d\n",b);
|
338
|
856 b = g.pte.lpn--;
|
427
|
857 printf("#0856:main3l-17: %d\n",b);
|
338
|
858 b = g.pte.lpn++;
|
427
|
859 printf("#0858:main3l-18: %d\n",b);
|
338
|
860 b = --g.pte.lpn;
|
427
|
861 printf("#0860:main3l-19: %d\n",b);
|
338
|
862 b = ++g.pte.lpn;
|
427
|
863 printf("#0862:main3l-20: %d\n",b);
|
338
|
864 b = (g.pte.lpn += i);
|
427
|
865 printf("#0864:main3l-21: %d\n",b);
|
338
|
866 b = (g.pte.lpn -= i);
|
427
|
867 printf("#0866:main3l-22: %d\n",b);
|
338
|
868 b = (g.pte.lpn *= i);
|
427
|
869 printf("#0868:main3l-23: %d\n",b);
|
338
|
870 b = (g.pte.lpn /= i);
|
427
|
871 printf("#0870:main3l-24: %d\n",b);
|
338
|
872 b = (g.pte.lpn %= i);
|
427
|
873 printf("#0872:main3l-25: %d\n",b);
|
338
|
874 b = (g.pte.lpn |= i);
|
427
|
875 printf("#0874:main3l-26: %d\n",b);
|
338
|
876 b = (g.pte.lpn &= i);
|
427
|
877 printf("#0876:main3l-27: %d\n",b);
|
338
|
878 b = (g.pte.lpn ^= i);
|
427
|
879 printf("#0878:main3l-28: %d\n",b);
|
338
|
880 b = (g.pte.lpn <<= i);
|
427
|
881 printf("#0880:main3l-29: %d\n",b);
|
338
|
882 b = (g.pte.lpn >>= i);
|
427
|
883 printf("#0882:main3l-30: %d\n",b);
|
338
|
884
|
|
885 return --b;
|
|
886 }
|
|
887
|
365
|
888
|
|
889 main6()
|
|
890 {
|
|
891 int i =0;
|
|
892 g.pte.api = 0;
|
427
|
893 printf("#0892:main5: %d %d\n",i++,g.pte.api);
|
365
|
894 g.pte.api = 1;
|
427
|
895 printf("#0894:main5: %d %d\n",i++,g.pte.api);
|
365
|
896 g.pte.api = 2;
|
427
|
897 printf("#0896:main5: %d %d\n",i++,g.pte.api);
|
365
|
898 g.pte.api = 3;
|
427
|
899 printf("#0898:main5: %d %d\n",i++,g.pte.api);
|
365
|
900 g.pte.api = 4;
|
427
|
901 printf("#0900:main5: %d %d\n",i++,g.pte.api);
|
365
|
902 g.pte.api = 5;
|
427
|
903 printf("#0902:main5: %d %d\n",i++,g.pte.api);
|
365
|
904 g.pte.api = 6;
|
427
|
905 printf("#0904:main5: %d %d\n",i++,g.pte.api);
|
365
|
906 g.pte.api = 7;
|
427
|
907 printf("#0906:main5: %d %d\n",i++,g.pte.api);
|
365
|
908 g.pte.api = 8;
|
427
|
909 printf("#0908:main5: %d %d\n",i++,g.pte.api);
|
365
|
910 g.pte.api = 9;
|
427
|
911 printf("#0910:main5: %d %d\n",i++,g.pte.api);
|
365
|
912 g.pte.api = 10;
|
427
|
913 printf("#0912:main5: %d %d\n",i++,g.pte.api);
|
365
|
914 g.pte.api = 11;
|
427
|
915 printf("#0914:main5: %d %d\n",i++,g.pte.api);
|
365
|
916 g.pte.api = 12;
|
427
|
917 printf("#0916:main5: %d %d\n",i++,g.pte.api);
|
365
|
918 g.pte.api = 13;
|
427
|
919 printf("#0918:main5: %d %d\n",i++,g.pte.api);
|
365
|
920 g.pte.api = 14;
|
427
|
921 printf("#0920:main5: %d %d\n",i++,g.pte.api);
|
365
|
922 g.pte.api = 15;
|
427
|
923 printf("#0922:main5: %d %d\n",i++,g.pte.api);
|
365
|
924 g.pte.api = 16;
|
427
|
925 printf("#0924:main5: %d %d\n",i++,g.pte.api);
|
365
|
926 g.pte.api = 17;
|
427
|
927 printf("#0926:main5: %d %d\n",i++,g.pte.api);
|
365
|
928 g.pte.api = 18;
|
427
|
929 printf("#0928:main5: %d %d\n",i++,g.pte.api);
|
365
|
930 g.pte.api = 19;
|
427
|
931 printf("#0930:main5: %d %d\n",i++,g.pte.api);
|
365
|
932 g.pte.api = 20;
|
427
|
933 printf("#0932:main5: %d %d\n",i++,g.pte.api);
|
365
|
934 g.pte.api = 21;
|
427
|
935 printf("#0934:main5: %d %d\n",i++,g.pte.api);
|
365
|
936 g.pte.api = 22;
|
427
|
937 printf("#0936:main5: %d %d\n",i++,g.pte.api);
|
365
|
938 g.pte.api = 23;
|
427
|
939 printf("#0938:main5: %d %d\n",i++,g.pte.api);
|
365
|
940 g.pte.api = 24;
|
427
|
941 printf("#0940:main5: %d %d\n",i++,g.pte.api);
|
365
|
942 g.pte.api = 25;
|
427
|
943 printf("#0942:main5: %d %d\n",i++,g.pte.api);
|
365
|
944 g.pte.api = 26;
|
427
|
945 printf("#0944:main5: %d %d\n",i++,g.pte.api);
|
365
|
946 g.pte.api = 27;
|
427
|
947 printf("#0946:main5: %d %d\n",i++,g.pte.api);
|
365
|
948 g.pte.api = 28;
|
427
|
949 printf("#0948:main5: %d %d\n",i++,g.pte.api);
|
365
|
950 g.pte.api = 29;
|
427
|
951 printf("#0950:main5: %d %d\n",i++,g.pte.api);
|
365
|
952 g.pte.api = 30;
|
427
|
953 printf("#0952:main5: %d %d\n",i++,g.pte.api);
|
365
|
954 g.pte.api = 31;
|
427
|
955 printf("#0954:main5: %d %d\n",i++,g.pte.api);
|
365
|
956 g.pte.api = 32;
|
427
|
957 printf("#0956:main5: %d %d\n",i++,g.pte.api);
|
365
|
958 g.pte.api = 33;
|
427
|
959 printf("#0958:main5: %d %d\n",i++,g.pte.api);
|
365
|
960 g.pte.api = 34;
|
427
|
961 printf("#0960:main5: %d %d\n",i++,g.pte.api);
|
365
|
962 g.pte.api = 35;
|
427
|
963 printf("#0962:main5: %d %d\n",i++,g.pte.api);
|
365
|
964 g.pte.api = 36;
|
427
|
965 printf("#0964:main5: %d %d\n",i++,g.pte.api);
|
365
|
966 g.pte.api = 37;
|
427
|
967 printf("#0966:main5: %d %d\n",i++,g.pte.api);
|
365
|
968 g.pte.api = 38;
|
427
|
969 printf("#0968:main5: %d %d\n",i++,g.pte.api);
|
365
|
970 g.pte.api = 39;
|
427
|
971 printf("#0970:main5: %d %d\n",i++,g.pte.api);
|
365
|
972 g.pte.api = 40;
|
427
|
973 printf("#0972:main5: %d %d\n",i++,g.pte.api);
|
365
|
974 g.pte.api = 41;
|
427
|
975 printf("#0974:main5: %d %d\n",i++,g.pte.api);
|
365
|
976 g.pte.api = 42;
|
427
|
977 printf("#0976:main5: %d %d\n",i++,g.pte.api);
|
365
|
978 g.pte.api = 43;
|
427
|
979 printf("#0978:main5: %d %d\n",i++,g.pte.api);
|
365
|
980 g.pte.api = 44;
|
427
|
981 printf("#0980:main5: %d %d\n",i++,g.pte.api);
|
365
|
982 g.pte.api = 45;
|
427
|
983 printf("#0982:main5: %d %d\n",i++,g.pte.api);
|
365
|
984 g.pte.api = 46;
|
427
|
985 printf("#0984:main5: %d %d\n",i++,g.pte.api);
|
365
|
986 g.pte.api = 47;
|
427
|
987 printf("#0986:main5: %d %d\n",i++,g.pte.api);
|
365
|
988 g.pte.api = 48;
|
427
|
989 printf("#0988:main5: %d %d\n",i++,g.pte.api);
|
365
|
990 g.pte.api = 49;
|
427
|
991 printf("#0990:main5: %d %d\n",i++,g.pte.api);
|
365
|
992 g.pte.api = 50;
|
427
|
993 printf("#0992:main5: %d %d\n",i++,g.pte.api);
|
365
|
994 g.pte.api = 51;
|
427
|
995 printf("#0994:main5: %d %d\n",i++,g.pte.api);
|
365
|
996 g.pte.api = 52;
|
427
|
997 printf("#0996:main5: %d %d\n",i++,g.pte.api);
|
365
|
998 g.pte.api = 53;
|
427
|
999 printf("#0998:main5: %d %d\n",i++,g.pte.api);
|
365
|
1000 g.pte.api = 54;
|
427
|
1001 printf("#1000:main5: %d %d\n",i++,g.pte.api);
|
365
|
1002 g.pte.api = 55;
|
427
|
1003 printf("#1002:main5: %d %d\n",i++,g.pte.api);
|
365
|
1004 g.pte.api = 56;
|
427
|
1005 printf("#1004:main5: %d %d\n",i++,g.pte.api);
|
365
|
1006 g.pte.api = 57;
|
427
|
1007 printf("#1006:main5: %d %d\n",i++,g.pte.api);
|
365
|
1008 g.pte.api = 58;
|
427
|
1009 printf("#1008:main5: %d %d\n",i++,g.pte.api);
|
365
|
1010 g.pte.api = 59;
|
427
|
1011 printf("#1010:main5: %d %d\n",i++,g.pte.api);
|
365
|
1012 g.pte.api = 60;
|
427
|
1013 printf("#1012:main5: %d %d\n",i++,g.pte.api);
|
365
|
1014 g.pte.api = 61;
|
427
|
1015 printf("#1014:main5: %d %d\n",i++,g.pte.api);
|
365
|
1016 g.pte.api = 62;
|
427
|
1017 printf("#1016:main5: %d %d\n",i++,g.pte.api);
|
365
|
1018 g.pte.api = 63;
|
427
|
1019 printf("#1018:main5: %d %d\n",i++,g.pte.api);
|
365
|
1020 }
|
|
1021
|
|
1022 main7()
|
|
1023 {
|
|
1024 int i;
|
|
1025 for (i=-2;i<2;i++) {
|
|
1026 g.pte.api = i;
|
|
1027 if (g.pte.api) {
|
427
|
1028 printf("#1027:main 7:1 %d yes\n",i);
|
365
|
1029 } else {
|
427
|
1030 printf("#1029:main 7:1 %d no\n",i);
|
365
|
1031 }
|
|
1032 if (g.pte.api==1) {
|
427
|
1033 printf("#1032:main 7:2 %d yes\n",i);
|
365
|
1034 } else {
|
427
|
1035 printf("#1034:main 7:2 %d no\n",i);
|
365
|
1036 }
|
|
1037 if (g.pte.api==-1) {
|
427
|
1038 printf("#1037:main 7:3 %d yes\n",i);
|
365
|
1039 } else {
|
427
|
1040 printf("#1039:main 7:3 %d no\n",i);
|
365
|
1041 }
|
|
1042 }
|
|
1043 for (i=-2;i<2;i++) {
|
|
1044 g.sg.v = i;
|
|
1045 if (g.sg.v) {
|
427
|
1046 printf("#1045:main 7:4 %d yes\n",i);
|
365
|
1047 } else {
|
427
|
1048 printf("#1047:main 7:4 %d no\n",i);
|
365
|
1049 }
|
|
1050 if (g.sg.v==1) {
|
427
|
1051 printf("#1050:main 7:5 %d yes\n",i);
|
365
|
1052 } else {
|
427
|
1053 printf("#1052:main 7:5 %d no\n",i);
|
365
|
1054 }
|
|
1055 if (g.sg.v==-1) {
|
427
|
1056 printf("#1055:main 7:6 %d yes\n",i);
|
365
|
1057 } else {
|
427
|
1058 printf("#1057:main 7:6 %d no\n",i);
|
365
|
1059 }
|
|
1060 }
|
|
1061 }
|
|
1062
|
|
1063 /* end */
|