1 |
205 |
julius |
#
|
2 |
|
|
# Some h8300sx tests -- t12_bit
|
3 |
|
|
#
|
4 |
|
|
|
5 |
|
|
proc do_t12_bit_test {} {
|
6 |
|
|
set testname "t12_bit.s -- h8sx bit tests"
|
7 |
|
|
|
8 |
|
|
gas_start "t12_bit.s" "-al"
|
9 |
|
|
|
10 |
|
|
# Check each instruction bit pattern to verify it got assembled correctly.
|
11 |
|
|
|
12 |
|
|
set x 0
|
13 |
|
|
expect {
|
14 |
|
|
-re ".* 7 0000 7071" { set x [expr $x+1]; exp_continue; }
|
15 |
|
|
-re ".* 8 0002 7D107070" { set x [expr $x+1]; exp_continue; }
|
16 |
|
|
-re ".* 9 0006 7F127070" { set x [expr $x+1]; exp_continue; }
|
17 |
|
|
-re ".* 10 000a 6A181234" { set x [expr $x+1]; exp_continue; }
|
18 |
|
|
-re ".* 10 7070" { set x [expr $x+1]; exp_continue; }
|
19 |
|
|
-re ".* 11 0010 6A381234" { set x [expr $x+1]; exp_continue; }
|
20 |
|
|
-re ".* 11 56787070" { set x [expr $x+1]; exp_continue; }
|
21 |
|
|
-re ".* 12 " {
|
22 |
|
|
if [expr $x == 7] then {
|
23 |
|
|
pass "$testname: bset #0x7, ..."
|
24 |
|
|
} else {
|
25 |
|
|
fail "$testname: bset #0x7, ... ($x)"
|
26 |
|
|
}
|
27 |
|
|
}
|
28 |
|
|
default { fail "$testname: bset #0x7, ... ($x)" }
|
29 |
|
|
}
|
30 |
|
|
|
31 |
|
|
set x 0
|
32 |
|
|
expect {
|
33 |
|
|
-re ".* 13 0018 6031" { set x [expr $x+1]; exp_continue; }
|
34 |
|
|
-re ".* 14 001a 7D106030" { set x [expr $x+1]; exp_continue; }
|
35 |
|
|
-re ".* 15 001e 7F126030" { set x [expr $x+1]; exp_continue; }
|
36 |
|
|
-re ".* 16 0022 6A181234" { set x [expr $x+1]; exp_continue; }
|
37 |
|
|
-re ".* 16 6030" { set x [expr $x+1]; exp_continue; }
|
38 |
|
|
-re ".* 17 0028 6A381234" { set x [expr $x+1]; exp_continue; }
|
39 |
|
|
-re ".* 17 56786030" { set x [expr $x+1]; exp_continue; }
|
40 |
|
|
-re ".* 18 " {
|
41 |
|
|
if [expr $x == 7] then {
|
42 |
|
|
pass "$testname: bset r3h, ..."
|
43 |
|
|
} else {
|
44 |
|
|
fail "$testname: bset r3h, ... ($x)"
|
45 |
|
|
}
|
46 |
|
|
}
|
47 |
|
|
default { fail "$testname: bset r3h, ... ($x)" }
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
set x 0
|
51 |
|
|
expect {
|
52 |
|
|
-re ".* 19 0030 7D107077" { set x [expr $x+1]; exp_continue; }
|
53 |
|
|
-re ".* 20 0034 7F127077" { set x [expr $x+1]; exp_continue; }
|
54 |
|
|
-re ".* 21 0038 6A181234" { set x [expr $x+1]; exp_continue; }
|
55 |
|
|
-re ".* 21 7077" { set x [expr $x+1]; exp_continue; }
|
56 |
|
|
-re ".* 22 003e 6A381234" { set x [expr $x+1]; exp_continue; }
|
57 |
|
|
-re ".* 22 56787077" { set x [expr $x+1]; exp_continue; }
|
58 |
|
|
-re ".* 23 " {
|
59 |
|
|
if [expr $x == 6] then {
|
60 |
|
|
pass "$testname: bset/eq #0x7, ..."
|
61 |
|
|
} else {
|
62 |
|
|
fail "$testname: bset/eq #0x7, ... ($x)"
|
63 |
|
|
}
|
64 |
|
|
}
|
65 |
|
|
default { fail "$testname: bset/eq #0x7, ... ($x)" }
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
set x 0
|
69 |
|
|
expect {
|
70 |
|
|
-re ".* 24 0046 7D106037" { set x [expr $x+1]; exp_continue; }
|
71 |
|
|
-re ".* 25 004a 7F126037" { set x [expr $x+1]; exp_continue; }
|
72 |
|
|
-re ".* 26 004e 6A181234" { set x [expr $x+1]; exp_continue; }
|
73 |
|
|
-re ".* 26 6037" { set x [expr $x+1]; exp_continue; }
|
74 |
|
|
-re ".* 27 0054 6A381234" { set x [expr $x+1]; exp_continue; }
|
75 |
|
|
-re ".* 27 56786037" { set x [expr $x+1]; exp_continue; }
|
76 |
|
|
-re ".* 28 " {
|
77 |
|
|
if [expr $x == 6] then {
|
78 |
|
|
pass "$testname: bset/eq r3h, ..."
|
79 |
|
|
} else {
|
80 |
|
|
fail "$testname: bset/eq r3h, ... ($x)"
|
81 |
|
|
}
|
82 |
|
|
}
|
83 |
|
|
default { fail "$testname: bset/eq r3h, ... ($x)" }
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
set x 0
|
87 |
|
|
expect {
|
88 |
|
|
-re ".* 29 005c 7D107076" { set x [expr $x+1]; exp_continue; }
|
89 |
|
|
-re ".* 30 0060 7F127076" { set x [expr $x+1]; exp_continue; }
|
90 |
|
|
-re ".* 31 0064 6A181234" { set x [expr $x+1]; exp_continue; }
|
91 |
|
|
-re ".* 31 7076" { set x [expr $x+1]; exp_continue; }
|
92 |
|
|
-re ".* 32 006a 6A381234" { set x [expr $x+1]; exp_continue; }
|
93 |
|
|
-re ".* 32 56787076" { set x [expr $x+1]; exp_continue; }
|
94 |
|
|
-re ".* 33 " {
|
95 |
|
|
if [expr $x == 6] then {
|
96 |
|
|
pass "$testname: bset/ne #0x7, ..."
|
97 |
|
|
} else {
|
98 |
|
|
fail "$testname: bset/ne #0x7, ... ($x)"
|
99 |
|
|
}
|
100 |
|
|
}
|
101 |
|
|
default { fail "$testname: bset/ne #0x7, ... ($x)" }
|
102 |
|
|
}
|
103 |
|
|
|
104 |
|
|
set x 0
|
105 |
|
|
expect {
|
106 |
|
|
-re ".* 34 0072 7D106036" { set x [expr $x+1]; exp_continue; }
|
107 |
|
|
-re ".* 35 0076 7F126036" { set x [expr $x+1]; exp_continue; }
|
108 |
|
|
-re ".* 36 007a 6A181234" { set x [expr $x+1]; exp_continue; }
|
109 |
|
|
-re ".* 36 6036" { set x [expr $x+1]; exp_continue; }
|
110 |
|
|
-re ".* 37 0080 6A381234" { set x [expr $x+1]; exp_continue; }
|
111 |
|
|
-re ".* 37 56786036" { set x [expr $x+1]; exp_continue; }
|
112 |
|
|
-re ".* 38 " {
|
113 |
|
|
if [expr $x == 6] then {
|
114 |
|
|
pass "$testname: bset/ne r3h, ..."
|
115 |
|
|
} else {
|
116 |
|
|
fail "$testname: bset/ne r3h, ... ($x)"
|
117 |
|
|
}
|
118 |
|
|
}
|
119 |
|
|
default { fail "$testname: bset/ne r3h, ... ($x)" }
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
set x 0
|
123 |
|
|
expect {
|
124 |
|
|
-re ".* 39 0088 7171" { set x [expr $x+1]; exp_continue; }
|
125 |
|
|
-re ".* 40 008a 7D107170" { set x [expr $x+1]; exp_continue; }
|
126 |
|
|
-re ".* 41 008e 7F127170" { set x [expr $x+1]; exp_continue; }
|
127 |
|
|
-re ".* 42 0092 6A181234" { set x [expr $x+1]; exp_continue; }
|
128 |
|
|
-re ".* 42 7170" { set x [expr $x+1]; exp_continue; }
|
129 |
|
|
-re ".* 43 0098 6A381234" { set x [expr $x+1]; exp_continue; }
|
130 |
|
|
-re ".* 43 56787170" { set x [expr $x+1]; exp_continue; }
|
131 |
|
|
-re ".* 44 " {
|
132 |
|
|
if [expr $x == 7] then {
|
133 |
|
|
pass "$testname: bnot #0x7, ..."
|
134 |
|
|
} else {
|
135 |
|
|
fail "$testname: bnot #0x7, ... ($x)"
|
136 |
|
|
}
|
137 |
|
|
}
|
138 |
|
|
default { fail "$testname: bnot #0x7, ... ($x)" }
|
139 |
|
|
}
|
140 |
|
|
|
141 |
|
|
set x 0
|
142 |
|
|
expect {
|
143 |
|
|
-re ".* 45 00a0 6131" { set x [expr $x+1]; exp_continue; }
|
144 |
|
|
-re ".* 46 00a2 7D106130" { set x [expr $x+1]; exp_continue; }
|
145 |
|
|
-re ".* 47 00a6 7F126130" { set x [expr $x+1]; exp_continue; }
|
146 |
|
|
-re ".* 48 00aa 6A181234" { set x [expr $x+1]; exp_continue; }
|
147 |
|
|
-re ".* 48 6130" { set x [expr $x+1]; exp_continue; }
|
148 |
|
|
-re ".* 49 00b0 6A381234" { set x [expr $x+1]; exp_continue; }
|
149 |
|
|
-re ".* 49 56786130" { set x [expr $x+1]; exp_continue; }
|
150 |
|
|
-re ".* 50 " {
|
151 |
|
|
if [expr $x == 7] then {
|
152 |
|
|
pass "$testname: bnot r3h, ..."
|
153 |
|
|
} else {
|
154 |
|
|
fail "$testname: bnot r3h, ... ($x)"
|
155 |
|
|
}
|
156 |
|
|
}
|
157 |
|
|
default { fail "$testname: bnot r3h, ... ($x)" }
|
158 |
|
|
}
|
159 |
|
|
|
160 |
|
|
set x 0
|
161 |
|
|
expect {
|
162 |
|
|
-re ".* 51 00b8 7271" { set x [expr $x+1]; exp_continue; }
|
163 |
|
|
-re ".* 52 00ba 7D107270" { set x [expr $x+1]; exp_continue; }
|
164 |
|
|
-re ".* 53 00be 7F127270" { set x [expr $x+1]; exp_continue; }
|
165 |
|
|
-re ".* 54 00c2 6A181234" { set x [expr $x+1]; exp_continue; }
|
166 |
|
|
-re ".* 54 7270" { set x [expr $x+1]; exp_continue; }
|
167 |
|
|
-re ".* 55 00c8 6A381234" { set x [expr $x+1]; exp_continue; }
|
168 |
|
|
-re ".* 55 56787270" { set x [expr $x+1]; exp_continue; }
|
169 |
|
|
-re ".* 56 " {
|
170 |
|
|
if [expr $x == 7] then {
|
171 |
|
|
pass "$testname: bclr #0x7, ..."
|
172 |
|
|
} else {
|
173 |
|
|
fail "$testname: bclr #0x7, ... ($x)"
|
174 |
|
|
}
|
175 |
|
|
}
|
176 |
|
|
default { fail "$testname: bclr #0x7, ... ($x)" }
|
177 |
|
|
}
|
178 |
|
|
|
179 |
|
|
set x 0
|
180 |
|
|
expect {
|
181 |
|
|
-re ".* 57 00d0 6231" { set x [expr $x+1]; exp_continue; }
|
182 |
|
|
-re ".* 58 00d2 7D106230" { set x [expr $x+1]; exp_continue; }
|
183 |
|
|
-re ".* 59 00d6 7F126230" { set x [expr $x+1]; exp_continue; }
|
184 |
|
|
-re ".* 60 00da 6A181234" { set x [expr $x+1]; exp_continue; }
|
185 |
|
|
-re ".* 60 6230" { set x [expr $x+1]; exp_continue; }
|
186 |
|
|
-re ".* 61 00e0 6A381234" { set x [expr $x+1]; exp_continue; }
|
187 |
|
|
-re ".* 61 56786230" { set x [expr $x+1]; exp_continue; }
|
188 |
|
|
-re ".* 62 " {
|
189 |
|
|
if [expr $x == 7] then {
|
190 |
|
|
pass "$testname: bclr r3h, ..."
|
191 |
|
|
} else {
|
192 |
|
|
fail "$testname: bclr r3h, ... ($x)"
|
193 |
|
|
}
|
194 |
|
|
}
|
195 |
|
|
default { fail "$testname: bclr r3h, ... ($x)" }
|
196 |
|
|
}
|
197 |
|
|
|
198 |
|
|
set x 0
|
199 |
|
|
expect {
|
200 |
|
|
-re ".* 63 00e8 7D107277" { set x [expr $x+1]; exp_continue; }
|
201 |
|
|
-re ".* 64 00ec 7F127277" { set x [expr $x+1]; exp_continue; }
|
202 |
|
|
-re ".* 65 00f0 6A181234" { set x [expr $x+1]; exp_continue; }
|
203 |
|
|
-re ".* 65 7277" { set x [expr $x+1]; exp_continue; }
|
204 |
|
|
-re ".* 66 00f6 6A381234" { set x [expr $x+1]; exp_continue; }
|
205 |
|
|
-re ".* 66 56787277" { set x [expr $x+1]; exp_continue; }
|
206 |
|
|
-re ".* 67 " {
|
207 |
|
|
if [expr $x == 6] then {
|
208 |
|
|
pass "$testname: bclr/eq #0x7, ..."
|
209 |
|
|
} else {
|
210 |
|
|
fail "$testname: bclr/eq #0x7, ... ($x)"
|
211 |
|
|
}
|
212 |
|
|
}
|
213 |
|
|
default { fail "$testname: bclr/eq #0x7, ... ($x)" }
|
214 |
|
|
}
|
215 |
|
|
|
216 |
|
|
set x 0
|
217 |
|
|
expect {
|
218 |
|
|
-re ".* 68 00fe 7D106237" { set x [expr $x+1]; exp_continue; }
|
219 |
|
|
-re ".* 69 0102 7F126237" { set x [expr $x+1]; exp_continue; }
|
220 |
|
|
-re ".* 70 0106 6A181234" { set x [expr $x+1]; exp_continue; }
|
221 |
|
|
-re ".* 70 6237" { set x [expr $x+1]; exp_continue; }
|
222 |
|
|
-re ".* 71 010c 6A381234" { set x [expr $x+1]; exp_continue; }
|
223 |
|
|
-re ".* 71 56786237" { set x [expr $x+1]; exp_continue; }
|
224 |
|
|
-re ".* 72 " {
|
225 |
|
|
if [expr $x == 6] then {
|
226 |
|
|
pass "$testname: bclr/eq r3h, ..."
|
227 |
|
|
} else {
|
228 |
|
|
fail "$testname: bclr/eq r3h, ... ($x)"
|
229 |
|
|
}
|
230 |
|
|
}
|
231 |
|
|
default { fail "$testname: bclr/eq r3h, ... ($x)" }
|
232 |
|
|
}
|
233 |
|
|
|
234 |
|
|
set x 0
|
235 |
|
|
expect {
|
236 |
|
|
-re ".* 73 0114 7D107276" { set x [expr $x+1]; exp_continue; }
|
237 |
|
|
-re ".* 74 0118 7F127276" { set x [expr $x+1]; exp_continue; }
|
238 |
|
|
-re ".* 75 011c 6A181234" { set x [expr $x+1]; exp_continue; }
|
239 |
|
|
-re ".* 75 7276" { set x [expr $x+1]; exp_continue; }
|
240 |
|
|
-re ".* 76 0122 6A381234" { set x [expr $x+1]; exp_continue; }
|
241 |
|
|
-re ".* 76 56787276" { set x [expr $x+1]; exp_continue; }
|
242 |
|
|
-re ".* 77 " {
|
243 |
|
|
if [expr $x == 6] then {
|
244 |
|
|
pass "$testname: bclr/ne #0x7, ..."
|
245 |
|
|
} else {
|
246 |
|
|
fail "$testname: bclr/ne #0x7, ... ($x)"
|
247 |
|
|
}
|
248 |
|
|
}
|
249 |
|
|
default { fail "$testname: bclr/ne #0x7, ... ($x)" }
|
250 |
|
|
}
|
251 |
|
|
|
252 |
|
|
set x 0
|
253 |
|
|
expect {
|
254 |
|
|
-re ".* 78 012a 7D106236" { set x [expr $x+1]; exp_continue; }
|
255 |
|
|
-re ".* 79 012e 7F126236" { set x [expr $x+1]; exp_continue; }
|
256 |
|
|
-re ".* 80 0132 6A181234" { set x [expr $x+1]; exp_continue; }
|
257 |
|
|
-re ".* 80 6236" { set x [expr $x+1]; exp_continue; }
|
258 |
|
|
-re ".* 81 0138 6A381234" { set x [expr $x+1]; exp_continue; }
|
259 |
|
|
-re ".* 81 56786236" { set x [expr $x+1]; exp_continue; }
|
260 |
|
|
-re ".* 82 " {
|
261 |
|
|
if [expr $x == 6] then {
|
262 |
|
|
pass "$testname: bclr/ne r3h, ..."
|
263 |
|
|
} else {
|
264 |
|
|
fail "$testname: bclr/ne r3h, ... ($x)"
|
265 |
|
|
}
|
266 |
|
|
}
|
267 |
|
|
default { fail "$testname: bclr/ne r3h, ... ($x)" }
|
268 |
|
|
}
|
269 |
|
|
|
270 |
|
|
set x 0
|
271 |
|
|
expect {
|
272 |
|
|
-re ".* 83 0140 7371" { set x [expr $x+1]; exp_continue; }
|
273 |
|
|
-re ".* 84 0142 7C107370" { set x [expr $x+1]; exp_continue; }
|
274 |
|
|
-re ".* 85 0146 7E127370" { set x [expr $x+1]; exp_continue; }
|
275 |
|
|
-re ".* 86 014a 6A101234" { set x [expr $x+1]; exp_continue; }
|
276 |
|
|
-re ".* 86 7370" { set x [expr $x+1]; exp_continue; }
|
277 |
|
|
-re ".* 87 0150 6A301234" { set x [expr $x+1]; exp_continue; }
|
278 |
|
|
-re ".* 87 56787370" { set x [expr $x+1]; exp_continue; }
|
279 |
|
|
-re ".* 88 " {
|
280 |
|
|
if [expr $x == 7] then {
|
281 |
|
|
pass "$testname: btst #0x7, ..."
|
282 |
|
|
} else {
|
283 |
|
|
fail "$testname: btst #0x7, ... ($x)"
|
284 |
|
|
}
|
285 |
|
|
}
|
286 |
|
|
default { fail "$testname: btst #0x7, ... ($x)" }
|
287 |
|
|
}
|
288 |
|
|
|
289 |
|
|
set x 0
|
290 |
|
|
expect {
|
291 |
|
|
-re ".* 89 0158 6331" { set x [expr $x+1]; exp_continue; }
|
292 |
|
|
-re ".* 90 015a 7C106330" { set x [expr $x+1]; exp_continue; }
|
293 |
|
|
-re ".* 91 015e 7E126330" { set x [expr $x+1]; exp_continue; }
|
294 |
|
|
-re ".* 92 0162 6A101234" { set x [expr $x+1]; exp_continue; }
|
295 |
|
|
-re ".* 92 6330" { set x [expr $x+1]; exp_continue; }
|
296 |
|
|
-re ".* 93 0168 6A301234" { set x [expr $x+1]; exp_continue; }
|
297 |
|
|
-re ".* 93 56786330" { set x [expr $x+1]; exp_continue; }
|
298 |
|
|
-re ".* 94 " {
|
299 |
|
|
if [expr $x == 7] then {
|
300 |
|
|
pass "$testname: btst r3h, ..."
|
301 |
|
|
} else {
|
302 |
|
|
fail "$testname: btst r3h, ... ($x)"
|
303 |
|
|
}
|
304 |
|
|
}
|
305 |
|
|
default { fail "$testname: btst r3h, ... ($x)" }
|
306 |
|
|
}
|
307 |
|
|
|
308 |
|
|
set x 0
|
309 |
|
|
expect {
|
310 |
|
|
-re ".* 95 0170 7471" { set x [expr $x+1]; exp_continue; }
|
311 |
|
|
-re ".* 96 0172 7C107470" { set x [expr $x+1]; exp_continue; }
|
312 |
|
|
-re ".* 97 0176 7E127470" { set x [expr $x+1]; exp_continue; }
|
313 |
|
|
-re ".* 98 017a 6A101234" { set x [expr $x+1]; exp_continue; }
|
314 |
|
|
-re ".* 98 7470" { set x [expr $x+1]; exp_continue; }
|
315 |
|
|
-re ".* 99 0180 6A301234" { set x [expr $x+1]; exp_continue; }
|
316 |
|
|
-re ".* 99 56787470" { set x [expr $x+1]; exp_continue; }
|
317 |
|
|
-re ".* 100 " {
|
318 |
|
|
if [expr $x == 7] then {
|
319 |
|
|
pass "$testname: bor #0x7, ..."
|
320 |
|
|
} else {
|
321 |
|
|
fail "$testname: bor #0x7, ... ($x)"
|
322 |
|
|
}
|
323 |
|
|
}
|
324 |
|
|
default { fail "$testname: bor #0x7, ... ($x)" }
|
325 |
|
|
}
|
326 |
|
|
|
327 |
|
|
set x 0
|
328 |
|
|
expect {
|
329 |
|
|
-re ".* 101 0188 74F1" { set x [expr $x+1]; exp_continue; }
|
330 |
|
|
-re ".* 102 018a 7C1074F0" { set x [expr $x+1]; exp_continue; }
|
331 |
|
|
-re ".* 103 018e 7E1274F0" { set x [expr $x+1]; exp_continue; }
|
332 |
|
|
-re ".* 104 0192 6A101234" { set x [expr $x+1]; exp_continue; }
|
333 |
|
|
-re ".* 104 74F0" { set x [expr $x+1]; exp_continue; }
|
334 |
|
|
-re ".* 105 0198 6A301234" { set x [expr $x+1]; exp_continue; }
|
335 |
|
|
-re ".* 105 567874F0" { set x [expr $x+1]; exp_continue; }
|
336 |
|
|
-re ".* 106 " {
|
337 |
|
|
if [expr $x == 7] then {
|
338 |
|
|
pass "$testname: bior #0x7, ..."
|
339 |
|
|
} else {
|
340 |
|
|
fail "$testname: bior #0x7, ... ($x)"
|
341 |
|
|
}
|
342 |
|
|
}
|
343 |
|
|
default { fail "$testname: bior #0x7, ... ($x)" }
|
344 |
|
|
}
|
345 |
|
|
|
346 |
|
|
set x 0
|
347 |
|
|
expect {
|
348 |
|
|
-re ".* 107 01a0 7571" { set x [expr $x+1]; exp_continue; }
|
349 |
|
|
-re ".* 108 01a2 7C107570" { set x [expr $x+1]; exp_continue; }
|
350 |
|
|
-re ".* 109 01a6 7E127570" { set x [expr $x+1]; exp_continue; }
|
351 |
|
|
-re ".* 110 01aa 6A101234" { set x [expr $x+1]; exp_continue; }
|
352 |
|
|
-re ".* 110 7570" { set x [expr $x+1]; exp_continue; }
|
353 |
|
|
-re ".* 111 01b0 6A301234" { set x [expr $x+1]; exp_continue; }
|
354 |
|
|
-re ".* 111 56787570" { set x [expr $x+1]; exp_continue; }
|
355 |
|
|
-re ".* 112 " {
|
356 |
|
|
if [expr $x == 7] then {
|
357 |
|
|
pass "$testname: bxor #0x7, ..."
|
358 |
|
|
} else {
|
359 |
|
|
fail "$testname: bxor #0x7, ... ($x)"
|
360 |
|
|
}
|
361 |
|
|
}
|
362 |
|
|
default { fail "$testname: bxor #0x7, ... ($x)" }
|
363 |
|
|
}
|
364 |
|
|
|
365 |
|
|
set x 0
|
366 |
|
|
expect {
|
367 |
|
|
-re ".* 113 01b8 75F1" { set x [expr $x+1]; exp_continue; }
|
368 |
|
|
-re ".* 114 01ba 7C1075F0" { set x [expr $x+1]; exp_continue; }
|
369 |
|
|
-re ".* 115 01be 7E1275F0" { set x [expr $x+1]; exp_continue; }
|
370 |
|
|
-re ".* 116 01c2 6A101234" { set x [expr $x+1]; exp_continue; }
|
371 |
|
|
-re ".* 116 75F0" { set x [expr $x+1]; exp_continue; }
|
372 |
|
|
-re ".* 117 01c8 6A301234" { set x [expr $x+1]; exp_continue; }
|
373 |
|
|
-re ".* 117 567875F0" { set x [expr $x+1]; exp_continue; }
|
374 |
|
|
-re ".* 118 " {
|
375 |
|
|
if [expr $x == 7] then {
|
376 |
|
|
pass "$testname: bixor #0x7, ..."
|
377 |
|
|
} else {
|
378 |
|
|
fail "$testname: bixor #0x7, ... ($x)"
|
379 |
|
|
}
|
380 |
|
|
}
|
381 |
|
|
default { fail "$testname: bixor #0x7, ... ($x)" }
|
382 |
|
|
}
|
383 |
|
|
|
384 |
|
|
set x 0
|
385 |
|
|
expect {
|
386 |
|
|
-re ".* 119 01d0 7671" { set x [expr $x+1]; exp_continue; }
|
387 |
|
|
-re ".* 120 01d2 7C107670" { set x [expr $x+1]; exp_continue; }
|
388 |
|
|
-re ".* 121 01d6 7E127670" { set x [expr $x+1]; exp_continue; }
|
389 |
|
|
-re ".* 122 01da 6A101234" { set x [expr $x+1]; exp_continue; }
|
390 |
|
|
-re ".* 122 7670" { set x [expr $x+1]; exp_continue; }
|
391 |
|
|
-re ".* 123 01e0 6A301234" { set x [expr $x+1]; exp_continue; }
|
392 |
|
|
-re ".* 123 56787670" { set x [expr $x+1]; exp_continue; }
|
393 |
|
|
-re ".* 124 " {
|
394 |
|
|
if [expr $x == 7] then {
|
395 |
|
|
pass "$testname: band #0x7, ..."
|
396 |
|
|
} else {
|
397 |
|
|
fail "$testname: band #0x7, ... ($x)"
|
398 |
|
|
}
|
399 |
|
|
}
|
400 |
|
|
default { fail "$testname: band #0x7, ... ($x)" }
|
401 |
|
|
}
|
402 |
|
|
|
403 |
|
|
set x 0
|
404 |
|
|
expect {
|
405 |
|
|
-re ".* 125 01e8 76F1" { set x [expr $x+1]; exp_continue; }
|
406 |
|
|
-re ".* 126 01ea 7C1076F0" { set x [expr $x+1]; exp_continue; }
|
407 |
|
|
-re ".* 127 01ee 7E1276F0" { set x [expr $x+1]; exp_continue; }
|
408 |
|
|
-re ".* 128 01f2 6A101234" { set x [expr $x+1]; exp_continue; }
|
409 |
|
|
-re ".* 128 76F0" { set x [expr $x+1]; exp_continue; }
|
410 |
|
|
-re ".* 129 01f8 6A301234" { set x [expr $x+1]; exp_continue; }
|
411 |
|
|
-re ".* 129 567876F0" { set x [expr $x+1]; exp_continue; }
|
412 |
|
|
-re ".* 130 " {
|
413 |
|
|
if [expr $x == 7] then {
|
414 |
|
|
pass "$testname: biand #0x7, ..."
|
415 |
|
|
} else {
|
416 |
|
|
fail "$testname: biand #0x7, ... ($x)"
|
417 |
|
|
}
|
418 |
|
|
}
|
419 |
|
|
default { fail "$testname: biand #0x7, ... ($x)" }
|
420 |
|
|
}
|
421 |
|
|
|
422 |
|
|
set x 0
|
423 |
|
|
expect {
|
424 |
|
|
-re ".* 131 0200 7771" { set x [expr $x+1]; exp_continue; }
|
425 |
|
|
-re ".* 132 0202 7C107770" { set x [expr $x+1]; exp_continue; }
|
426 |
|
|
-re ".* 133 0206 7E127770" { set x [expr $x+1]; exp_continue; }
|
427 |
|
|
-re ".* 134 020a 6A101234" { set x [expr $x+1]; exp_continue; }
|
428 |
|
|
-re ".* 134 7770" { set x [expr $x+1]; exp_continue; }
|
429 |
|
|
-re ".* 135 0210 6A301234" { set x [expr $x+1]; exp_continue; }
|
430 |
|
|
-re ".* 135 56787770" { set x [expr $x+1]; exp_continue; }
|
431 |
|
|
-re ".* 136 " {
|
432 |
|
|
if [expr $x == 7] then {
|
433 |
|
|
pass "$testname: bld #0x7, ..."
|
434 |
|
|
} else {
|
435 |
|
|
fail "$testname: bld #0x7, ... ($x)"
|
436 |
|
|
}
|
437 |
|
|
}
|
438 |
|
|
default { fail "$testname: bld #0x7, ... ($x)" }
|
439 |
|
|
}
|
440 |
|
|
|
441 |
|
|
set x 0
|
442 |
|
|
expect {
|
443 |
|
|
-re ".* 137 0218 77F1" { set x [expr $x+1]; exp_continue; }
|
444 |
|
|
-re ".* 138 021a 7C1077F0" { set x [expr $x+1]; exp_continue; }
|
445 |
|
|
-re ".* 139 021e 7E1277F0" { set x [expr $x+1]; exp_continue; }
|
446 |
|
|
-re ".* 140 0222 6A101234" { set x [expr $x+1]; exp_continue; }
|
447 |
|
|
-re ".* 140 77F0" { set x [expr $x+1]; exp_continue; }
|
448 |
|
|
-re ".* 141 0228 6A301234" { set x [expr $x+1]; exp_continue; }
|
449 |
|
|
-re ".* 141 567877F0" { set x [expr $x+1]; exp_continue; }
|
450 |
|
|
-re ".* 142 " {
|
451 |
|
|
if [expr $x == 7] then {
|
452 |
|
|
pass "$testname: bild #0x7, ..."
|
453 |
|
|
} else {
|
454 |
|
|
fail "$testname: bild #0x7, ... ($x)"
|
455 |
|
|
}
|
456 |
|
|
}
|
457 |
|
|
default { fail "$testname: bild #0x7, ... ($x)" }
|
458 |
|
|
}
|
459 |
|
|
|
460 |
|
|
set x 0
|
461 |
|
|
expect {
|
462 |
|
|
-re ".* 143 0230 6771" { set x [expr $x+1]; exp_continue; }
|
463 |
|
|
-re ".* 144 0232 7D106770" { set x [expr $x+1]; exp_continue; }
|
464 |
|
|
-re ".* 145 0236 7F126770" { set x [expr $x+1]; exp_continue; }
|
465 |
|
|
-re ".* 146 023a 6A181234" { set x [expr $x+1]; exp_continue; }
|
466 |
|
|
-re ".* 146 6770" { set x [expr $x+1]; exp_continue; }
|
467 |
|
|
-re ".* 147 0240 6A381234" { set x [expr $x+1]; exp_continue; }
|
468 |
|
|
-re ".* 147 56786770" { set x [expr $x+1]; exp_continue; }
|
469 |
|
|
-re ".* 148 " {
|
470 |
|
|
if [expr $x == 7] then {
|
471 |
|
|
pass "$testname: bst #0x7, ..."
|
472 |
|
|
} else {
|
473 |
|
|
fail "$testname: bst #0x7, ... ($x)"
|
474 |
|
|
}
|
475 |
|
|
}
|
476 |
|
|
default { fail "$testname: bst #0x7, ... ($x)" }
|
477 |
|
|
}
|
478 |
|
|
|
479 |
|
|
set x 0
|
480 |
|
|
expect {
|
481 |
|
|
-re ".* 149 0248 7D106777" { set x [expr $x+1]; exp_continue; }
|
482 |
|
|
-re ".* 150 024c 7F126777" { set x [expr $x+1]; exp_continue; }
|
483 |
|
|
-re ".* 151 0250 6A181234" { set x [expr $x+1]; exp_continue; }
|
484 |
|
|
-re ".* 151 6777" { set x [expr $x+1]; exp_continue; }
|
485 |
|
|
-re ".* 152 0256 6A381234" { set x [expr $x+1]; exp_continue; }
|
486 |
|
|
-re ".* 152 56786777" { set x [expr $x+1]; exp_continue; }
|
487 |
|
|
-re ".* 153 " {
|
488 |
|
|
if [expr $x == 6] then {
|
489 |
|
|
pass "$testname: bstz #0x7, ..."
|
490 |
|
|
} else {
|
491 |
|
|
fail "$testname: bstz #0x7, ... ($x)"
|
492 |
|
|
}
|
493 |
|
|
}
|
494 |
|
|
default { fail "$testname: bstz #0x7, ... ($x)" }
|
495 |
|
|
}
|
496 |
|
|
|
497 |
|
|
set x 0
|
498 |
|
|
expect {
|
499 |
|
|
-re ".* 154 025e 67F1" { set x [expr $x+1]; exp_continue; }
|
500 |
|
|
-re ".* 155 0260 7D1067F0" { set x [expr $x+1]; exp_continue; }
|
501 |
|
|
-re ".* 156 0264 7F1267F0" { set x [expr $x+1]; exp_continue; }
|
502 |
|
|
-re ".* 157 0268 6A181234" { set x [expr $x+1]; exp_continue; }
|
503 |
|
|
-re ".* 157 67F0" { set x [expr $x+1]; exp_continue; }
|
504 |
|
|
-re ".* 158 026e 6A381234" { set x [expr $x+1]; exp_continue; }
|
505 |
|
|
-re ".* 158 567867F0" { set x [expr $x+1]; exp_continue; }
|
506 |
|
|
-re ".* 159 " {
|
507 |
|
|
if [expr $x == 7] then {
|
508 |
|
|
pass "$testname: bist #0x7, ..."
|
509 |
|
|
} else {
|
510 |
|
|
fail "$testname: bist #0x7, ... ($x)"
|
511 |
|
|
}
|
512 |
|
|
}
|
513 |
|
|
default { fail "$testname: bist #0x7, ... ($x)" }
|
514 |
|
|
}
|
515 |
|
|
|
516 |
|
|
set x 0
|
517 |
|
|
expect {
|
518 |
|
|
-re ".* 160 0276 7D1067F7" { set x [expr $x+1]; exp_continue; }
|
519 |
|
|
-re ".* 161 027a 7F1267F7" { set x [expr $x+1]; exp_continue; }
|
520 |
|
|
-re ".* 162 027e 6A181234" { set x [expr $x+1]; exp_continue; }
|
521 |
|
|
-re ".* 162 67F7" { set x [expr $x+1]; exp_continue; }
|
522 |
|
|
-re ".* 163 0284 6A381234" { set x [expr $x+1]; exp_continue; }
|
523 |
|
|
-re ".* 163 567867F7" { set x [expr $x+1]; exp_continue; }
|
524 |
|
|
-re ".* 164 " {
|
525 |
|
|
if [expr $x == 6] then {
|
526 |
|
|
pass "$testname: bistz #0x7, ..."
|
527 |
|
|
} else {
|
528 |
|
|
fail "$testname: bistz #0x7, ... ($x)"
|
529 |
|
|
}
|
530 |
|
|
}
|
531 |
|
|
default { fail "$testname: bistz #0x7, ... ($x)" }
|
532 |
|
|
}
|
533 |
|
|
|
534 |
|
|
set x 0
|
535 |
|
|
expect {
|
536 |
|
|
-re ".* 165 028c 7C10F334" { set x [expr $x+1]; exp_continue; }
|
537 |
|
|
-re ".* 166 0290 7E12F334" { set x [expr $x+1]; exp_continue; }
|
538 |
|
|
-re ".* 167 0294 6A101234" { set x [expr $x+1]; exp_continue; }
|
539 |
|
|
-re ".* 167 F334" { set x [expr $x+1]; exp_continue; }
|
540 |
|
|
-re ".* 168 029a 6A301234" { set x [expr $x+1]; exp_continue; }
|
541 |
|
|
-re ".* 168 5678F334" { set x [expr $x+1]; exp_continue; }
|
542 |
|
|
-re ".* 169 " {
|
543 |
|
|
if [expr $x == 6] then {
|
544 |
|
|
pass "$testname: bfld #0x34:8, ..., r3h"
|
545 |
|
|
} else {
|
546 |
|
|
fail "$testname: bfld #0x34:8, ..., r3h ($x)"
|
547 |
|
|
}
|
548 |
|
|
}
|
549 |
|
|
default { fail "$testname: bfld #0x34:8, ..., r3h ($x)" }
|
550 |
|
|
}
|
551 |
|
|
|
552 |
|
|
set x 0
|
553 |
|
|
expect {
|
554 |
|
|
-re ".* 170 02a2 7D10F334" { set x [expr $x+1]; exp_continue; }
|
555 |
|
|
-re ".* 171 02a6 7F12F334" { set x [expr $x+1]; exp_continue; }
|
556 |
|
|
-re ".* 172 02aa 6A181234" { set x [expr $x+1]; exp_continue; }
|
557 |
|
|
-re ".* 172 F334" { set x [expr $x+1]; exp_continue; }
|
558 |
|
|
-re ".* 173 02b0 6A381234" { set x [expr $x+1]; exp_continue; }
|
559 |
|
|
-re ".* 173 5678F334" { set x [expr $x+1]; exp_continue; }
|
560 |
|
|
-re ".* 174 " {
|
561 |
|
|
if [expr $x == 6] then {
|
562 |
|
|
pass "$testname: bfst r3h, #0x34:8, ..."
|
563 |
|
|
} else {
|
564 |
|
|
fail "$testname: bfst r3h, #0x34:8, ... ($x)"
|
565 |
|
|
}
|
566 |
|
|
}
|
567 |
|
|
default { fail "$testname: bfst r3h, #0x34:8, ... ($x)" }
|
568 |
|
|
}
|
569 |
|
|
|
570 |
|
|
# This was intended to do any cleanup necessary.
|
571 |
|
|
# It kinda looks like it isn't needed, but just
|
572 |
|
|
# in case, please keep it in for now.
|
573 |
|
|
|
574 |
|
|
gas_finish
|
575 |
|
|
|
576 |
|
|
}
|
577 |
|
|
|
578 |
|
|
if [istarget h8300*-*-elf] then {
|
579 |
|
|
# Test advanced h8300sx instructions.
|
580 |
|
|
do_t12_bit_test
|
581 |
|
|
}
|
582 |
|
|
|