annotate test/bitfield.c @ 423:8b9136a06f56

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