annotate test/bitfield.c @ 365:5ac17fa9d7e0

bit-field constant assignment
author kono
date Wed, 07 Jul 2004 14:34:25 +0900
parents 7fe7ce0a791f
children 8b9136a06f56
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();
338
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
192 main3();
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
193 main4();
365
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
194 main6();
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
195 main7();
336
d488b72254fb bit-field done.
kono
parents:
diff changeset
196 return 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
197 }
d488b72254fb bit-field done.
kono
parents:
diff changeset
198
d488b72254fb bit-field done.
kono
parents:
diff changeset
199 main2()
d488b72254fb bit-field done.
kono
parents:
diff changeset
200 {
d488b72254fb bit-field done.
kono
parents:
diff changeset
201 int i = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
202
d488b72254fb bit-field done.
kono
parents:
diff changeset
203 g.u[0]=0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
204 g.u[1]=0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
205
d488b72254fb bit-field done.
kono
parents:
diff changeset
206 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
207 g.sg. v = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
208 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
209 g.sg. vsid = -1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
210 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
211 g.sg. h = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
212 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
213 g.sg. api = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
214 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
215 g.sg. rpn = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
216 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
217
d488b72254fb bit-field done.
kono
parents:
diff changeset
218 g.sg. r = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
219 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
220 g.sg. c = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
221 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
222 g.sg. w = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
223 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
224 g.sg. i = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
225 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
226 g.sg. m = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
227 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
228 g.sg. g = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
229 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
230 g.sg. pp = 3;
d488b72254fb bit-field done.
kono
parents:
diff changeset
231 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
232
d488b72254fb bit-field done.
kono
parents:
diff changeset
233 g.u[0]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
234 g.u[1]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
235
d488b72254fb bit-field done.
kono
parents:
diff changeset
236 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
237 g.sg. v = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
238 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
239 g.sg. vsid = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
240 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
241 g.sg. h = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
242 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
243 g.sg. api = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
244 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
245 g.sg. rpn = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
246 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
247
d488b72254fb bit-field done.
kono
parents:
diff changeset
248 g.sg. r = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
249 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
250 g.sg. c = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
251 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
252 g.sg. w = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
253 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
254 g.sg. i = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
255 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
256 g.sg. m = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
257 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
258 g.sg. g = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
259 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
260 g.sg. pp = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
261 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
262
d488b72254fb bit-field done.
kono
parents:
diff changeset
263 g.u[0]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
264 g.u[1]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
265
d488b72254fb bit-field done.
kono
parents:
diff changeset
266 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
267 g.sg. v = 0x55;
d488b72254fb bit-field done.
kono
parents:
diff changeset
268 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
269 g.sg. vsid = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
270 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
271 g.sg. h = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
272 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
273 g.sg. api = 0x55;
d488b72254fb bit-field done.
kono
parents:
diff changeset
274 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
275 g.sg. rpn = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
276 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
277
d488b72254fb bit-field done.
kono
parents:
diff changeset
278 g.sg. r = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
279 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
280 g.sg. c = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
281 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
282 g.sg. w = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
283 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
284 g.sg. i = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
285 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
286 g.sg. m = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
287 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
288 g.sg. g = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
289 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
290 g.sg. pp = 0x5555555;
d488b72254fb bit-field done.
kono
parents:
diff changeset
291 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
292
d488b72254fb bit-field done.
kono
parents:
diff changeset
293 g.u[0]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
294 g.u[1]=-1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
295
d488b72254fb bit-field done.
kono
parents:
diff changeset
296 for(i=-0x100;i<0x100;i++) {
d488b72254fb bit-field done.
kono
parents:
diff changeset
297 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
298 g.sg. v = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
299 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
300 g.sg. vsid = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
301 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
302 g.sg. h = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
303 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
304 g.sg. api = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
305 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
306 g.sg. rpn = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
307 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
308
d488b72254fb bit-field done.
kono
parents:
diff changeset
309 g.sg. r = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
310 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
311 g.sg. c = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
312 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
313 g.sg. w = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
314 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
315 g.sg. i = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
316 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
317 g.sg. m = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
318 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
319 g.sg. g = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
320 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
321 g.sg. pp = i;
d488b72254fb bit-field done.
kono
parents:
diff changeset
322 printf("% 3d: 0x%08x%08x\n",i++,g.u[0],g.u[1]);
d488b72254fb bit-field done.
kono
parents:
diff changeset
323 }
d488b72254fb bit-field done.
kono
parents:
diff changeset
324
d488b72254fb bit-field done.
kono
parents:
diff changeset
325 // printf("size of %d\n",sizeof(g.sg.pp)); no size of for bit-field
d488b72254fb bit-field done.
kono
parents:
diff changeset
326
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 // int :12 bit-field cannot be a return value;
d488b72254fb bit-field done.
kono
parents:
diff changeset
330 // main3( int a:8 ) bit-field cannot be an argument;
d488b72254fb bit-field done.
kono
parents:
diff changeset
331 main3( int a )
d488b72254fb bit-field done.
kono
parents:
diff changeset
332 {
d488b72254fb bit-field done.
kono
parents:
diff changeset
333 // int b:9; // nor local variable
338
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
334 int b,i;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
335 i = 7;
336
d488b72254fb bit-field done.
kono
parents:
diff changeset
336
d488b72254fb bit-field done.
kono
parents:
diff changeset
337
338
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
338 b = g.pte.rpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
339 printf("main3-0: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
340 b = g.pte.rpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
341 printf("main3-1: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
342 b = g.pte.rpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
343 printf("main3-2: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
344 b = --g.pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
345 printf("main3-3: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
346 b = ++g.pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
347 printf("main3-4: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
348 b = (g.pte.rpn += 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
349 printf("main3-5: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
350 b = (g.pte.rpn -= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
351 printf("main3-6: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
352 b = (g.pte.rpn *= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
353 printf("main3-7: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
354 b = (g.pte.rpn /= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
355 printf("main3-8: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
356 b = (g.pte.rpn %= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
357 printf("main3-9: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
358 b = (g.pte.rpn |= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
359 printf("main3-10: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
360 b = (g.pte.rpn &= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
361 printf("main3-12: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
362 b = (g.pte.rpn ^= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
363 printf("main3-13: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
364 b = (g.pte.rpn <<= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
365 printf("main3-14: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
366 b = (g.pte.rpn >>= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
367 printf("main3-15: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
368
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
369 g.pte.rpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
370 printf("main3-16: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
371 b = g.pte.rpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
372 printf("main3-17: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
373 b = g.pte.rpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
374 printf("main3-18: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
375 b = --g.pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
376 printf("main3-19: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
377 b = ++g.pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
378 printf("main3-20: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
379 b = (g.pte.rpn += i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
380 printf("main3-21: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
381 b = (g.pte.rpn -= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
382 printf("main3-22: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
383 b = (g.pte.rpn *= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
384 printf("main3-23: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
385 b = (g.pte.rpn /= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
386 printf("main3-24: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
387 b = (g.pte.rpn %= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
388 printf("main3-25: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
389 b = (g.pte.rpn |= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
390 printf("main3-26: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
391 b = (g.pte.rpn &= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
392 printf("main3-27: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
393 b = (g.pte.rpn ^= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
394 printf("main3-28: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
395 b = (g.pte.rpn <<= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
396 printf("main3-29: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
397 b = (g.pte.rpn >>= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
398 printf("main3-30: %d\n",b);
336
d488b72254fb bit-field done.
kono
parents:
diff changeset
399
d488b72254fb bit-field done.
kono
parents:
diff changeset
400 return --b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
401 }
d488b72254fb bit-field done.
kono
parents:
diff changeset
402
338
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
403 main4( int a )
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
404 {
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
405 // int b:9; // nor local variable
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
406 int b,i;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
407 PTE *pg = &g;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
408
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
409 i = 7;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
410
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 pg->pte.rpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
413 printf("main4-0: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
414 b = pg->pte.rpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
415 printf("main4-1: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
416 b = pg->pte.rpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
417 printf("main4-2: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
418 b = --pg->pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
419 printf("main4-3: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
420 b = ++pg->pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
421 printf("main4-4: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
422 b = (pg->pte.rpn += 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
423 printf("main4-5: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
424 b = (pg->pte.rpn -= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
425 printf("main4-6: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
426 b = (pg->pte.rpn *= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
427 printf("main4-7: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
428 b = (pg->pte.rpn /= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
429 printf("main4-8: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
430 b = (pg->pte.rpn %= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
431 printf("main4-9: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
432 b = (pg->pte.rpn |= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
433 printf("main4-10: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
434 b = (pg->pte.rpn &= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
435 printf("main4-12: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
436 b = (pg->pte.rpn ^= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
437 printf("main4-13: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
438 b = (pg->pte.rpn <<= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
439 printf("main4-14: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
440 b = (pg->pte.rpn >>= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
441 printf("main4-15: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
442
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
443 pg->pte.rpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
444 printf("main4-16: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
445 b = pg->pte.rpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
446 printf("main4-17: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
447 b = pg->pte.rpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
448 printf("main4-18: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
449 b = --pg->pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
450 printf("main4-19: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
451 b = ++pg->pte.rpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
452 printf("main4-20: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
453 b = (pg->pte.rpn += i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
454 printf("main4-21: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
455 b = (pg->pte.rpn -= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
456 printf("main4-22: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
457 b = (pg->pte.rpn *= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
458 printf("main4-23: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
459 b = (pg->pte.rpn /= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
460 printf("main4-24: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
461 b = (pg->pte.rpn %= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
462 printf("main4-25: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
463 b = (pg->pte.rpn |= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
464 printf("main4-26: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
465 b = (pg->pte.rpn &= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
466 printf("main4-27: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
467 b = (pg->pte.rpn ^= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
468 printf("main4-28: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
469 b = (pg->pte.rpn <<= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
470 printf("main4-29: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
471 b = (pg->pte.rpn >>= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
472 printf("main4-30: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
473
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
474 return --b;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
475 }
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
336
d488b72254fb bit-field done.
kono
parents:
diff changeset
478
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 union ll1 {
d488b72254fb bit-field done.
kono
parents:
diff changeset
482 int a[8];
d488b72254fb bit-field done.
kono
parents:
diff changeset
483 struct {
d488b72254fb bit-field done.
kono
parents:
diff changeset
484 char a:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
485 long long v:33;
d488b72254fb bit-field done.
kono
parents:
diff changeset
486 long long w:33;
d488b72254fb bit-field done.
kono
parents:
diff changeset
487 long long x:33;
d488b72254fb bit-field done.
kono
parents:
diff changeset
488 } b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
489 } ll1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
490
d488b72254fb bit-field done.
kono
parents:
diff changeset
491 union ll0 {
d488b72254fb bit-field done.
kono
parents:
diff changeset
492 int a[8];
d488b72254fb bit-field done.
kono
parents:
diff changeset
493 struct {
d488b72254fb bit-field done.
kono
parents:
diff changeset
494 char a:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
495 long long v:48;
d488b72254fb bit-field done.
kono
parents:
diff changeset
496 long long w:48;
d488b72254fb bit-field done.
kono
parents:
diff changeset
497 long long x:48;
d488b72254fb bit-field done.
kono
parents:
diff changeset
498 } b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
499 } ll0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
500
d488b72254fb bit-field done.
kono
parents:
diff changeset
501
d488b72254fb bit-field done.
kono
parents:
diff changeset
502 union ll {
d488b72254fb bit-field done.
kono
parents:
diff changeset
503 int a[8];
d488b72254fb bit-field done.
kono
parents:
diff changeset
504 struct {
d488b72254fb bit-field done.
kono
parents:
diff changeset
505 char a:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
506 long long v:56;
d488b72254fb bit-field done.
kono
parents:
diff changeset
507 long long w:56;
d488b72254fb bit-field done.
kono
parents:
diff changeset
508 long long x:56;
d488b72254fb bit-field done.
kono
parents:
diff changeset
509 } b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
510 } ll;
d488b72254fb bit-field done.
kono
parents:
diff changeset
511
d488b72254fb bit-field done.
kono
parents:
diff changeset
512 union cc {
d488b72254fb bit-field done.
kono
parents:
diff changeset
513 int a;
d488b72254fb bit-field done.
kono
parents:
diff changeset
514 struct {
d488b72254fb bit-field done.
kono
parents:
diff changeset
515 char a:1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
516 char b:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
517 char c:7;
d488b72254fb bit-field done.
kono
parents:
diff changeset
518 char d:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
519 char e:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
520 char f:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
521 } b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
522 } cc;
d488b72254fb bit-field done.
kono
parents:
diff changeset
523
d488b72254fb bit-field done.
kono
parents:
diff changeset
524 union ii {
d488b72254fb bit-field done.
kono
parents:
diff changeset
525 int a;
d488b72254fb bit-field done.
kono
parents:
diff changeset
526 struct {
d488b72254fb bit-field done.
kono
parents:
diff changeset
527 int a:1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
528 int b:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
529 int c:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
530 int d:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
531 int e:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
532 int f:4;
d488b72254fb bit-field done.
kono
parents:
diff changeset
533 } b;
d488b72254fb bit-field done.
kono
parents:
diff changeset
534 } ii;
d488b72254fb bit-field done.
kono
parents:
diff changeset
535
d488b72254fb bit-field done.
kono
parents:
diff changeset
536 int m1 = -1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
537 int p1 = 1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
538 int zero = 0;
d488b72254fb bit-field done.
kono
parents:
diff changeset
539
d488b72254fb bit-field done.
kono
parents:
diff changeset
540 main5()
d488b72254fb bit-field done.
kono
parents:
diff changeset
541 {
d488b72254fb bit-field done.
kono
parents:
diff changeset
542 ii.b.a = -1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
543 printf("00:%d\n",ii.b.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
544
d488b72254fb bit-field done.
kono
parents:
diff changeset
545 ll1.b.v = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
546 printf("01:%llx\n",ll1.b.v);
d488b72254fb bit-field done.
kono
parents:
diff changeset
547 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
548 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
549 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
550 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
551 ll1.b.v = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
552 ll1.b.w = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
553 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
554 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
555 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
556 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
557 ll1.b.w = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
558 ll1.b.x = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
559 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
560 ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
561 ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
562 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
563
d488b72254fb bit-field done.
kono
parents:
diff changeset
564 ll0.b.v = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
565 printf("01:%llx\n",ll0.b.v);
d488b72254fb bit-field done.
kono
parents:
diff changeset
566 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
567 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
568 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
569 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
570 ll0.b.v = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
571 ll0.b.w = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
572 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
573 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
574 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
575 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
576 ll0.b.w = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
577 ll0.b.x = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
578 printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
579 ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
580 ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
581 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
582
d488b72254fb bit-field done.
kono
parents:
diff changeset
583 ll.b.v = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
584 printf("1:%llx\n",ll.b.v);
d488b72254fb bit-field done.
kono
parents:
diff changeset
585 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
586 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
587 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
588 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
589 ll.b.v = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
590 ll.b.w = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
591 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
592 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
593 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
594 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
595 ll.b.w = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
596 ll.b.x = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
597 printf("2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
d488b72254fb bit-field done.
kono
parents:
diff changeset
598 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
d488b72254fb bit-field done.
kono
parents:
diff changeset
599 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
d488b72254fb bit-field done.
kono
parents:
diff changeset
600 );
d488b72254fb bit-field done.
kono
parents:
diff changeset
601
d488b72254fb bit-field done.
kono
parents:
diff changeset
602 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
603 cc.b.a = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
604 printf("a:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
605 cc.b.b = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
606 printf("b:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
607 cc.b.c = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
608 printf("c:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
609 cc.b.d = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
610 printf("d:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
611 cc.b.e = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
612 printf("e:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
613 cc.b.f = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
614 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
615 printf("3:%d %d\n",cc.b.c,cc.b.d);
d488b72254fb bit-field done.
kono
parents:
diff changeset
616 cc.a = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
617 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
618 cc.b.a = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
619 printf("a:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
620 cc.b.b = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
621 printf("b:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
622 cc.b.c = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
623 printf("c:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
624 cc.b.d = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
625 printf("d:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
626 cc.b.e = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
627 printf("e:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
628 cc.b.f = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
629 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
630 printf("3:%d %d\n",cc.b.c,cc.b.d);
d488b72254fb bit-field done.
kono
parents:
diff changeset
631 cc.a = zero;
d488b72254fb bit-field done.
kono
parents:
diff changeset
632 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
633 cc.b.a = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
634 printf("a:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
635 cc.b.b = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
636 printf("b:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
637 cc.b.c = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
638 printf("c:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
639 cc.b.d = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
640 printf("d:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
641 cc.b.e = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
642 printf("e:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
643 cc.b.f = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
644 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
645 printf("3:%d %d\n",cc.b.c,cc.b.d);
d488b72254fb bit-field done.
kono
parents:
diff changeset
646 cc.a = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
647 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
648 cc.b.a = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
649 printf("a:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
650 cc.b.b = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
651 printf("b:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
652 cc.b.c = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
653 printf("c:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
654 cc.b.d = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
655 printf("d:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
656 cc.b.e = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
657 printf("e:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
658 cc.b.f = p1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
659 printf("f:%08x\n",cc.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
660 printf("3:%d %d\n",cc.b.c,cc.b.d);
d488b72254fb bit-field done.
kono
parents:
diff changeset
661
d488b72254fb bit-field done.
kono
parents:
diff changeset
662 ii.b.a = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
663 printf("6:%08x\n",ii.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
664 ii.b.d = m1;
d488b72254fb bit-field done.
kono
parents:
diff changeset
665 printf("6:%08x\n",ii.a);
d488b72254fb bit-field done.
kono
parents:
diff changeset
666 printf("5:%d %d\n",ii.b.a,ii.b.d);
d488b72254fb bit-field done.
kono
parents:
diff changeset
667 }
d488b72254fb bit-field done.
kono
parents:
diff changeset
668
d488b72254fb bit-field done.
kono
parents:
diff changeset
669
338
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
670 main3l( int a )
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
671 {
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
672 // int b:9; // nor local variable
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
673 long long b,i;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
674 i = 7;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
675
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
676
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
677 g.pte.lpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
678 printf("main3l-0: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
679 b = g.pte.lpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
680 printf("main3l-1: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
681 b = g.pte.lpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
682 printf("main3l-2: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
683 b = --g.pte.lpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
684 printf("main3l-3: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
685 b = ++g.pte.lpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
686 printf("main3l-4: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
687 b = (g.pte.lpn += 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
688 printf("main3l-5: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
689 b = (g.pte.lpn -= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
690 printf("main3l-6: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
691 b = (g.pte.lpn *= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
692 printf("main3l-7: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
693 b = (g.pte.lpn /= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
694 printf("main3l-8: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
695 b = (g.pte.lpn %= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
696 printf("main3l-9: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
697 b = (g.pte.lpn |= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
698 printf("main3l-10: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
699 b = (g.pte.lpn &= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
700 printf("main3l-12: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
701 b = (g.pte.lpn ^= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
702 printf("main3l-13: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
703 b = (g.pte.lpn <<= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
704 printf("main3l-14: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
705 b = (g.pte.lpn >>= 3);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
706 printf("main3l-15: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
707
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
708 g.pte.lpn = -333;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
709 printf("main3l-16: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
710 b = g.pte.lpn--;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
711 printf("main3l-17: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
712 b = g.pte.lpn++;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
713 printf("main3l-18: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
714 b = --g.pte.lpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
715 printf("main3l-19: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
716 b = ++g.pte.lpn;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
717 printf("main3l-20: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
718 b = (g.pte.lpn += i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
719 printf("main3l-21: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
720 b = (g.pte.lpn -= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
721 printf("main3l-22: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
722 b = (g.pte.lpn *= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
723 printf("main3l-23: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
724 b = (g.pte.lpn /= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
725 printf("main3l-24: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
726 b = (g.pte.lpn %= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
727 printf("main3l-25: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
728 b = (g.pte.lpn |= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
729 printf("main3l-26: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
730 b = (g.pte.lpn &= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
731 printf("main3l-27: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
732 b = (g.pte.lpn ^= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
733 printf("main3l-28: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
734 b = (g.pte.lpn <<= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
735 printf("main3l-29: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
736 b = (g.pte.lpn >>= i);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
737 printf("main3l-30: %d\n",b);
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
738
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
739 return --b;
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
740 }
7fe7ce0a791f bit-field done for IA32, PowerPC, MIPS.
kono
parents: 336
diff changeset
741
365
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
742
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
743 main6()
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
744 {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
745 int i =0;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
746 g.pte.api = 0;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
747 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
748 g.pte.api = 1;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
749 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
750 g.pte.api = 2;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
751 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
752 g.pte.api = 3;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
753 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
754 g.pte.api = 4;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
755 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
756 g.pte.api = 5;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
757 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
758 g.pte.api = 6;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
759 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
760 g.pte.api = 7;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
761 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
762 g.pte.api = 8;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
763 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
764 g.pte.api = 9;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
765 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
766 g.pte.api = 10;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
767 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
768 g.pte.api = 11;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
769 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
770 g.pte.api = 12;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
771 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
772 g.pte.api = 13;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
773 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
774 g.pte.api = 14;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
775 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
776 g.pte.api = 15;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
777 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
778 g.pte.api = 16;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
779 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
780 g.pte.api = 17;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
781 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
782 g.pte.api = 18;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
783 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
784 g.pte.api = 19;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
785 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
786 g.pte.api = 20;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
787 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
788 g.pte.api = 21;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
789 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
790 g.pte.api = 22;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
791 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
792 g.pte.api = 23;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
793 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
794 g.pte.api = 24;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
795 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
796 g.pte.api = 25;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
797 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
798 g.pte.api = 26;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
799 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
800 g.pte.api = 27;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
801 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
802 g.pte.api = 28;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
803 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
804 g.pte.api = 29;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
805 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
806 g.pte.api = 30;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
807 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
808 g.pte.api = 31;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
809 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
810 g.pte.api = 32;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
811 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
812 g.pte.api = 33;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
813 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
814 g.pte.api = 34;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
815 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
816 g.pte.api = 35;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
817 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
818 g.pte.api = 36;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
819 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
820 g.pte.api = 37;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
821 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
822 g.pte.api = 38;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
823 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
824 g.pte.api = 39;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
825 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
826 g.pte.api = 40;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
827 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
828 g.pte.api = 41;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
829 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
830 g.pte.api = 42;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
831 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
832 g.pte.api = 43;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
833 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
834 g.pte.api = 44;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
835 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
836 g.pte.api = 45;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
837 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
838 g.pte.api = 46;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
839 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
840 g.pte.api = 47;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
841 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
842 g.pte.api = 48;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
843 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
844 g.pte.api = 49;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
845 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
846 g.pte.api = 50;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
847 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
848 g.pte.api = 51;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
849 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
850 g.pte.api = 52;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
851 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
852 g.pte.api = 53;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
853 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
854 g.pte.api = 54;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
855 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
856 g.pte.api = 55;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
857 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
858 g.pte.api = 56;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
859 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
860 g.pte.api = 57;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
861 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
862 g.pte.api = 58;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
863 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
864 g.pte.api = 59;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
865 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
866 g.pte.api = 60;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
867 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
868 g.pte.api = 61;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
869 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
870 g.pte.api = 62;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
871 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
872 g.pte.api = 63;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
873 printf("main5: %d %d\n",i++,g.pte.api);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
874 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
875
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
876 main7()
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
877 {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
878 int i;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
879 for (i=-2;i<2;i++) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
880 g.pte.api = i;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
881 if (g.pte.api) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
882 printf("main 7:1 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
883 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
884 printf("main 7:1 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
885 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
886 if (g.pte.api==1) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
887 printf("main 7:2 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
888 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
889 printf("main 7:2 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
890 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
891 if (g.pte.api==-1) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
892 printf("main 7:3 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
893 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
894 printf("main 7:3 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
895 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
896 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
897 for (i=-2;i<2;i++) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
898 g.sg.v = i;
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
899 if (g.sg.v) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
900 printf("main 7:4 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
901 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
902 printf("main 7:4 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
903 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
904 if (g.sg.v==1) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
905 printf("main 7:5 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
906 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
907 printf("main 7:5 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
908 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
909 if (g.sg.v==-1) {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
910 printf("main 7:6 %d yes\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
911 } else {
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
912 printf("main 7:6 %d no\n",i);
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
913 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
914 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
915 }
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
916
5ac17fa9d7e0 bit-field constant assignment
kono
parents: 338
diff changeset
917 /* end */