1 |
38 |
julius |
#
|
2 |
|
|
# Some h8300sx tests -- t13_otr
|
3 |
|
|
#
|
4 |
|
|
|
5 |
|
|
proc do_t13_otr_test {} {
|
6 |
|
|
set testname "t13_otr.s -- h8sx misc tests"
|
7 |
|
|
|
8 |
|
|
gas_start "t13_otr.s" "-al"
|
9 |
|
|
|
10 |
|
|
# Check each instruction bit pattern to verify it got assembled correctly.
|
11 |
|
|
|
12 |
|
|
set x 0
|
13 |
|
|
expect {
|
14 |
|
|
-re ".* 11 1234 4000" { set x [expr $x+1]; exp_continue; }
|
15 |
|
|
-re ".* 12 1236 4100" { set x [expr $x+1]; exp_continue; }
|
16 |
|
|
-re ".* 13 1238 4200" { set x [expr $x+1]; exp_continue; }
|
17 |
|
|
-re ".* 14 123a 4300" { set x [expr $x+1]; exp_continue; }
|
18 |
|
|
-re ".* 15 123c 4400" { set x [expr $x+1]; exp_continue; }
|
19 |
|
|
-re ".* 16 123e 4500" { set x [expr $x+1]; exp_continue; }
|
20 |
|
|
-re ".* 17 1240 4600" { set x [expr $x+1]; exp_continue; }
|
21 |
|
|
-re ".* 18 1242 4700" { set x [expr $x+1]; exp_continue; }
|
22 |
|
|
-re ".* 19 1244 4800" { set x [expr $x+1]; exp_continue; }
|
23 |
|
|
-re ".* 20 1246 4900" { set x [expr $x+1]; exp_continue; }
|
24 |
|
|
-re ".* 21 1248 4A00" { set x [expr $x+1]; exp_continue; }
|
25 |
|
|
-re ".* 22 124a 4B00" { set x [expr $x+1]; exp_continue; }
|
26 |
|
|
-re ".* 23 124c 4C00" { set x [expr $x+1]; exp_continue; }
|
27 |
|
|
-re ".* 24 124e 4D00" { set x [expr $x+1]; exp_continue; }
|
28 |
|
|
-re ".* 25 1250 4E00" { set x [expr $x+1]; exp_continue; }
|
29 |
|
|
-re ".* 26 1252 4F00" { set x [expr $x+1]; exp_continue; }
|
30 |
|
|
-re ".* 27 " {
|
31 |
|
|
if [expr $x == 16] then {
|
32 |
|
|
pass "$testname: b\[cc\] 0x12+.+2"
|
33 |
|
|
} else {
|
34 |
|
|
fail "$testname: b\[cc\] 0x12+.+2 ($x)"
|
35 |
|
|
}
|
36 |
|
|
}
|
37 |
|
|
default { fail "$testname: b\[cc\] 0x12+.+2 ($x)" }
|
38 |
|
|
}
|
39 |
|
|
|
40 |
|
|
set x 0
|
41 |
|
|
expect {
|
42 |
|
|
-re ".* 28 1254 58000000" { set x [expr $x+1]; exp_continue; }
|
43 |
|
|
-re ".* 29 1258 58100000" { set x [expr $x+1]; exp_continue; }
|
44 |
|
|
-re ".* 30 125c 58200000" { set x [expr $x+1]; exp_continue; }
|
45 |
|
|
-re ".* 31 1260 58300000" { set x [expr $x+1]; exp_continue; }
|
46 |
|
|
-re ".* 32 1264 58400000" { set x [expr $x+1]; exp_continue; }
|
47 |
|
|
-re ".* 33 1268 58500000" { set x [expr $x+1]; exp_continue; }
|
48 |
|
|
-re ".* 34 126c 58600000" { set x [expr $x+1]; exp_continue; }
|
49 |
|
|
-re ".* 35 1270 58700000" { set x [expr $x+1]; exp_continue; }
|
50 |
|
|
-re ".* 36 1274 58800000" { set x [expr $x+1]; exp_continue; }
|
51 |
|
|
-re ".* 37 1278 58900000" { set x [expr $x+1]; exp_continue; }
|
52 |
|
|
-re ".* 38 127c 58A00000" { set x [expr $x+1]; exp_continue; }
|
53 |
|
|
-re ".* 39 1280 58B00000" { set x [expr $x+1]; exp_continue; }
|
54 |
|
|
-re ".* 40 1284 58C00000" { set x [expr $x+1]; exp_continue; }
|
55 |
|
|
-re ".* 41 1288 58D00000" { set x [expr $x+1]; exp_continue; }
|
56 |
|
|
-re ".* 42 128c 58E00000" { set x [expr $x+1]; exp_continue; }
|
57 |
|
|
-re ".* 43 1290 58F00000" { set x [expr $x+1]; exp_continue; }
|
58 |
|
|
-re ".* 44 " {
|
59 |
|
|
if [expr $x == 16] then {
|
60 |
|
|
pass "$testname: b\[cc\] 0x1234+.+4"
|
61 |
|
|
} else {
|
62 |
|
|
fail "$testname: b\[cc\] 0x1234+.+4 ($x)"
|
63 |
|
|
}
|
64 |
|
|
}
|
65 |
|
|
default { fail "$testname: b\[cc\] 0x1234+.+4 ($x)" }
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
set x 0
|
69 |
|
|
expect {
|
70 |
|
|
-re ".* 45 1294 4001" { set x [expr $x+1]; exp_continue; }
|
71 |
|
|
-re ".* 46 1296 0000" { set x [expr $x+1]; exp_continue; }
|
72 |
|
|
-re ".* 47 " {
|
73 |
|
|
if [expr $x == 2] then {
|
74 |
|
|
pass "$testname: bra/s"
|
75 |
|
|
} else {
|
76 |
|
|
fail "$testname: bra/s ($x)"
|
77 |
|
|
}
|
78 |
|
|
}
|
79 |
|
|
default { fail "$testname: bra/s ($x)" }
|
80 |
|
|
}
|
81 |
|
|
|
82 |
|
|
set x 0
|
83 |
|
|
expect {
|
84 |
|
|
-re ".* 48 1298 7C204700" { set x [expr $x+1]; exp_continue; }
|
85 |
|
|
-re ".* 49 129c 7E9A4700" { set x [expr $x+1]; exp_continue; }
|
86 |
|
|
-re ".* 50 12a0 6A101234" { set x [expr $x+1]; exp_continue; }
|
87 |
|
|
-re ".* 50 4700" { set x [expr $x+1]; exp_continue; }
|
88 |
|
|
-re ".* 51 12a6 6A301234" { set x [expr $x+1]; exp_continue; }
|
89 |
|
|
-re ".* 51 56784700" { set x [expr $x+1]; exp_continue; }
|
90 |
|
|
-re ".* 52 12ae 7C205870" { set x [expr $x+1]; exp_continue; }
|
91 |
|
|
-re ".* 52 0000" { set x [expr $x+1]; exp_continue; }
|
92 |
|
|
-re ".* 53 12b4 7E125870" { set x [expr $x+1]; exp_continue; }
|
93 |
|
|
-re ".* 53 0000" { set x [expr $x+1]; exp_continue; }
|
94 |
|
|
-re ".* 54 12ba 6A109ABC" { set x [expr $x+1]; exp_continue; }
|
95 |
|
|
-re ".* 54 58700000" { set x [expr $x+1]; exp_continue; }
|
96 |
|
|
-re ".* 55 12c2 6A301234" { set x [expr $x+1]; exp_continue; }
|
97 |
|
|
-re ".* 55 56785870" { set x [expr $x+1]; exp_continue; }
|
98 |
|
|
-re ".* 55 0000" { set x [expr $x+1]; exp_continue; }
|
99 |
|
|
-re ".* 56 " {
|
100 |
|
|
if [expr $x == 15] then {
|
101 |
|
|
pass "$testname: bra/bc #0x7, ..."
|
102 |
|
|
} else {
|
103 |
|
|
fail "$testname: bra/bc #0x7, ... ($x)"
|
104 |
|
|
}
|
105 |
|
|
}
|
106 |
|
|
default { fail "$testname: bra/bc #0x7, ... ($x)" }
|
107 |
|
|
}
|
108 |
|
|
|
109 |
|
|
set x 0
|
110 |
|
|
expect {
|
111 |
|
|
-re ".* 57 12cc 7C204F00" { set x [expr $x+1]; exp_continue; }
|
112 |
|
|
-re ".* 58 12d0 7E9A4F00" { set x [expr $x+1]; exp_continue; }
|
113 |
|
|
-re ".* 59 12d4 6A101234" { set x [expr $x+1]; exp_continue; }
|
114 |
|
|
-re ".* 59 4F00" { set x [expr $x+1]; exp_continue; }
|
115 |
|
|
-re ".* 60 12da 6A301234" { set x [expr $x+1]; exp_continue; }
|
116 |
|
|
-re ".* 60 56784F00" { set x [expr $x+1]; exp_continue; }
|
117 |
|
|
-re ".* 61 12e2 7C2058F0" { set x [expr $x+1]; exp_continue; }
|
118 |
|
|
-re ".* 61 0000" { set x [expr $x+1]; exp_continue; }
|
119 |
|
|
-re ".* 62 12e8 7E1258F0" { set x [expr $x+1]; exp_continue; }
|
120 |
|
|
-re ".* 62 0000" { set x [expr $x+1]; exp_continue; }
|
121 |
|
|
-re ".* 63 12ee 6A109ABC" { set x [expr $x+1]; exp_continue; }
|
122 |
|
|
-re ".* 63 58F00000" { set x [expr $x+1]; exp_continue; }
|
123 |
|
|
-re ".* 64 12f6 6A301234" { set x [expr $x+1]; exp_continue; }
|
124 |
|
|
-re ".* 64 567858F0" { set x [expr $x+1]; exp_continue; }
|
125 |
|
|
-re ".* 64 0000" { set x [expr $x+1]; exp_continue; }
|
126 |
|
|
-re ".* 65 " {
|
127 |
|
|
if [expr $x == 15] then {
|
128 |
|
|
pass "$testname: bra/bs #0x7, ..."
|
129 |
|
|
} else {
|
130 |
|
|
fail "$testname: bra/bs #0x7, ... ($x)"
|
131 |
|
|
}
|
132 |
|
|
}
|
133 |
|
|
default { fail "$testname: bra/bs #0x7, ... ($x)" }
|
134 |
|
|
}
|
135 |
|
|
|
136 |
|
|
set x 0
|
137 |
|
|
expect {
|
138 |
|
|
-re ".* 66 1300 7C205C70" { set x [expr $x+1]; exp_continue; }
|
139 |
|
|
-re ".* 66 0000" { set x [expr $x+1]; exp_continue; }
|
140 |
|
|
-re ".* 67 1306 7E125C70" { set x [expr $x+1]; exp_continue; }
|
141 |
|
|
-re ".* 67 0000" { set x [expr $x+1]; exp_continue; }
|
142 |
|
|
-re ".* 68 130c 6A109ABC" { set x [expr $x+1]; exp_continue; }
|
143 |
|
|
-re ".* 68 5C700000" { set x [expr $x+1]; exp_continue; }
|
144 |
|
|
-re ".* 69 1314 6A301234" { set x [expr $x+1]; exp_continue; }
|
145 |
|
|
-re ".* 69 56785C70" { set x [expr $x+1]; exp_continue; }
|
146 |
|
|
-re ".* 69 0000" { set x [expr $x+1]; exp_continue; }
|
147 |
|
|
-re ".* 70 " {
|
148 |
|
|
if [expr $x == 9] then {
|
149 |
|
|
pass "$testname: bsr/bc #0x7, ..."
|
150 |
|
|
} else {
|
151 |
|
|
fail "$testname: bsr/bc #0x7, ... ($x)"
|
152 |
|
|
}
|
153 |
|
|
}
|
154 |
|
|
default { fail "$testname: bsr/bc #0x7, ... ($x)" }
|
155 |
|
|
}
|
156 |
|
|
|
157 |
|
|
set x 0
|
158 |
|
|
expect {
|
159 |
|
|
-re ".* 71 131e 7C205CF0" { set x [expr $x+1]; exp_continue; }
|
160 |
|
|
-re ".* 71 0000" { set x [expr $x+1]; exp_continue; }
|
161 |
|
|
-re ".* 72 1324 7E125CF0" { set x [expr $x+1]; exp_continue; }
|
162 |
|
|
-re ".* 72 0000" { set x [expr $x+1]; exp_continue; }
|
163 |
|
|
-re ".* 73 132a 6A109ABC" { set x [expr $x+1]; exp_continue; }
|
164 |
|
|
-re ".* 73 5CF00000" { set x [expr $x+1]; exp_continue; }
|
165 |
|
|
-re ".* 74 1332 6A301234" { set x [expr $x+1]; exp_continue; }
|
166 |
|
|
-re ".* 74 56785CF0" { set x [expr $x+1]; exp_continue; }
|
167 |
|
|
-re ".* 74 0000" { set x [expr $x+1]; exp_continue; }
|
168 |
|
|
-re ".* 75 " {
|
169 |
|
|
if [expr $x == 9] then {
|
170 |
|
|
pass "$testname: bsr/bs #0x7, ..."
|
171 |
|
|
} else {
|
172 |
|
|
fail "$testname: bsr/bs #0x7, ... ($x)"
|
173 |
|
|
}
|
174 |
|
|
}
|
175 |
|
|
default { fail "$testname: bsr/bs #0x7, ... ($x)" }
|
176 |
|
|
}
|
177 |
|
|
|
178 |
|
|
set x 0
|
179 |
|
|
expect {
|
180 |
|
|
-re ".* 76 133c 5925" { set x [expr $x+1]; exp_continue; }
|
181 |
|
|
-re ".* 77 133e 5926" { set x [expr $x+1]; exp_continue; }
|
182 |
|
|
-re ".* 78 1340 5927" { set x [expr $x+1]; exp_continue; }
|
183 |
|
|
-re ".* 79 " {
|
184 |
|
|
if [expr $x == 3] then {
|
185 |
|
|
pass "$testname: bra ..."
|
186 |
|
|
} else {
|
187 |
|
|
fail "$testname: bra ... ($x)"
|
188 |
|
|
}
|
189 |
|
|
}
|
190 |
|
|
default { fail "$testname: bra ... ($x)" }
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
set x 0
|
194 |
|
|
expect {
|
195 |
|
|
-re ".* 80 1342 5500" { set x [expr $x+1]; exp_continue; }
|
196 |
|
|
-re ".* 81 1344 5C000000" { set x [expr $x+1]; exp_continue; }
|
197 |
|
|
-re ".* 82 1348 5D25" { set x [expr $x+1]; exp_continue; }
|
198 |
|
|
-re ".* 83 134a 5D26" { set x [expr $x+1]; exp_continue; }
|
199 |
|
|
-re ".* 84 134c 5D27" { set x [expr $x+1]; exp_continue; }
|
200 |
|
|
-re ".* 85 " {
|
201 |
|
|
if [expr $x == 5] then {
|
202 |
|
|
pass "$testname: bsr ..."
|
203 |
|
|
} else {
|
204 |
|
|
fail "$testname: bsr ... ($x)"
|
205 |
|
|
}
|
206 |
|
|
}
|
207 |
|
|
default { fail "$testname: bsr ... ($x)" }
|
208 |
|
|
}
|
209 |
|
|
|
210 |
|
|
set x 0
|
211 |
|
|
expect {
|
212 |
|
|
-re ".* 86 134e 5920" { set x [expr $x+1]; exp_continue; }
|
213 |
|
|
-re ".* 87 1350 5A000000" { set x [expr $x+1]; exp_continue; }
|
214 |
|
|
-re ".* 88 1354 59080000" { set x [expr $x+1]; exp_continue; }
|
215 |
|
|
-re ".* 88 0000" { set x [expr $x+1]; exp_continue; }
|
216 |
|
|
-re ".* 89 135a 5B00" { set x [expr $x+1]; exp_continue; }
|
217 |
|
|
-re ".* 90 135c 5980" { set x [expr $x+1]; exp_continue; }
|
218 |
|
|
-re ".* 91 " {
|
219 |
|
|
if [expr $x == 6] then {
|
220 |
|
|
pass "$testname: jmp ..."
|
221 |
|
|
} else {
|
222 |
|
|
fail "$testname: jmp ... ($x)"
|
223 |
|
|
}
|
224 |
|
|
}
|
225 |
|
|
default { fail "$testname: jmp ... ($x)" }
|
226 |
|
|
}
|
227 |
|
|
|
228 |
|
|
set x 0
|
229 |
|
|
expect {
|
230 |
|
|
-re ".* 92 135e 5D20" { set x [expr $x+1]; exp_continue; }
|
231 |
|
|
-re ".* 93 1360 5E000000" { set x [expr $x+1]; exp_continue; }
|
232 |
|
|
-re ".* 94 1364 5D080000" { set x [expr $x+1]; exp_continue; }
|
233 |
|
|
-re ".* 94 0000" { set x [expr $x+1]; exp_continue; }
|
234 |
|
|
-re ".* 95 136a 5F00" { set x [expr $x+1]; exp_continue; }
|
235 |
|
|
-re ".* 96 136c 5D00" { set x [expr $x+1]; exp_continue; }
|
236 |
|
|
-re ".* 97 " {
|
237 |
|
|
if [expr $x == 6] then {
|
238 |
|
|
pass "$testname: jsr ..."
|
239 |
|
|
} else {
|
240 |
|
|
fail "$testname: jsr ... ($x)"
|
241 |
|
|
}
|
242 |
|
|
}
|
243 |
|
|
default { fail "$testname: jsr ... ($x)" }
|
244 |
|
|
}
|
245 |
|
|
|
246 |
|
|
set x 0
|
247 |
|
|
expect {
|
248 |
|
|
-re ".* 98 136e 5470" { set x [expr $x+1]; exp_continue; }
|
249 |
|
|
-re ".* 99 1370 5403" { set x [expr $x+1]; exp_continue; }
|
250 |
|
|
-re ".* 100 1372 5412" { set x [expr $x+1]; exp_continue; }
|
251 |
|
|
-re ".* 101 1374 5424" { set x [expr $x+1]; exp_continue; }
|
252 |
|
|
-re ".* 102 1376 5436" { set x [expr $x+1]; exp_continue; }
|
253 |
|
|
-re ".* 103 " {
|
254 |
|
|
if [expr $x == 5] then {
|
255 |
|
|
pass "$testname: rts\[/l\]"
|
256 |
|
|
} else {
|
257 |
|
|
fail "$testname: rts\[/l\] ($x)"
|
258 |
|
|
}
|
259 |
|
|
}
|
260 |
|
|
default { fail "$testname: rts\[/l\] ($x)" }
|
261 |
|
|
}
|
262 |
|
|
|
263 |
|
|
set x 0
|
264 |
|
|
expect {
|
265 |
|
|
-re ".* 104 1378 5730" { set x [expr $x+1]; exp_continue; }
|
266 |
|
|
-re ".* 105 " {
|
267 |
|
|
if [expr $x == 1] then {
|
268 |
|
|
pass "$testname: trapa #0x3"
|
269 |
|
|
} else {
|
270 |
|
|
fail "$testname: trapa #0x3 ($x)"
|
271 |
|
|
}
|
272 |
|
|
}
|
273 |
|
|
default { fail "$testname: trapa #0x3 ($x)" }
|
274 |
|
|
}
|
275 |
|
|
|
276 |
|
|
set x 0
|
277 |
|
|
expect {
|
278 |
|
|
-re ".* 106 137a 5670" { set x [expr $x+1]; exp_continue; }
|
279 |
|
|
-re ".* 107 137c 5603" { set x [expr $x+1]; exp_continue; }
|
280 |
|
|
-re ".* 108 137e 5612" { set x [expr $x+1]; exp_continue; }
|
281 |
|
|
-re ".* 109 1380 5624" { set x [expr $x+1]; exp_continue; }
|
282 |
|
|
-re ".* 110 1382 5636" { set x [expr $x+1]; exp_continue; }
|
283 |
|
|
-re ".* 111 " {
|
284 |
|
|
if [expr $x == 5] then {
|
285 |
|
|
pass "$testname: rte\[/l\]"
|
286 |
|
|
} else {
|
287 |
|
|
fail "$testname: rte\[/l\] ($x)"
|
288 |
|
|
}
|
289 |
|
|
}
|
290 |
|
|
default { fail "$testname: rte\[/l\] ($x)" }
|
291 |
|
|
}
|
292 |
|
|
|
293 |
|
|
set x 0
|
294 |
|
|
expect {
|
295 |
|
|
-re ".* 112 1384 0712" { set x [expr $x+1]; exp_continue; }
|
296 |
|
|
-re ".* 113 1386 0303" { set x [expr $x+1]; exp_continue; }
|
297 |
|
|
-re ".* 114 1388 01406930" { set x [expr $x+1]; exp_continue; }
|
298 |
|
|
-re ".* 115 138c 01406D30" { set x [expr $x+1]; exp_continue; }
|
299 |
|
|
-re ".* 116 1390 01406F30" { set x [expr $x+1]; exp_continue; }
|
300 |
|
|
-re ".* 116 1234" { set x [expr $x+1]; exp_continue; }
|
301 |
|
|
-re ".* 117 1396 01407830" { set x [expr $x+1]; exp_continue; }
|
302 |
|
|
-re ".* 117 6B201234" { set x [expr $x+1]; exp_continue; }
|
303 |
|
|
-re ".* 117 5678" { set x [expr $x+1]; exp_continue; }
|
304 |
|
|
-re ".* 118 13a0 01406B00" { set x [expr $x+1]; exp_continue; }
|
305 |
|
|
-re ".* 118 1234" { set x [expr $x+1]; exp_continue; }
|
306 |
|
|
-re ".* 119 13a6 01406B20" { set x [expr $x+1]; exp_continue; }
|
307 |
|
|
-re ".* 119 12345678" { set x [expr $x+1]; exp_continue; }
|
308 |
|
|
-re ".* 120 " {
|
309 |
|
|
if [expr $x == 13] then {
|
310 |
|
|
pass "$testname: ldc.w ..., ccr"
|
311 |
|
|
} else {
|
312 |
|
|
fail "$testname: ldc.w ..., ccr ($x)"
|
313 |
|
|
}
|
314 |
|
|
}
|
315 |
|
|
default { fail "$testname: ldc.w ..., ccr ($x)" }
|
316 |
|
|
}
|
317 |
|
|
|
318 |
|
|
set x 0
|
319 |
|
|
expect {
|
320 |
|
|
-re ".* 121 13ae 01410712" { set x [expr $x+1]; exp_continue; }
|
321 |
|
|
-re ".* 122 13b2 0313" { set x [expr $x+1]; exp_continue; }
|
322 |
|
|
-re ".* 123 13b4 01416930" { set x [expr $x+1]; exp_continue; }
|
323 |
|
|
-re ".* 124 13b8 01416D30" { set x [expr $x+1]; exp_continue; }
|
324 |
|
|
-re ".* 125 13bc 01416F30" { set x [expr $x+1]; exp_continue; }
|
325 |
|
|
-re ".* 125 1234" { set x [expr $x+1]; exp_continue; }
|
326 |
|
|
-re ".* 126 13c2 01417830" { set x [expr $x+1]; exp_continue; }
|
327 |
|
|
-re ".* 126 6B201234" { set x [expr $x+1]; exp_continue; }
|
328 |
|
|
-re ".* 126 5678" { set x [expr $x+1]; exp_continue; }
|
329 |
|
|
-re ".* 127 13cc 01416B00" { set x [expr $x+1]; exp_continue; }
|
330 |
|
|
-re ".* 127 1234" { set x [expr $x+1]; exp_continue; }
|
331 |
|
|
-re ".* 128 13d2 01416B20" { set x [expr $x+1]; exp_continue; }
|
332 |
|
|
-re ".* 128 12345678" { set x [expr $x+1]; exp_continue; }
|
333 |
|
|
-re ".* 129 " {
|
334 |
|
|
if [expr $x == 13] then {
|
335 |
|
|
pass "$testname: ldc.w ..., exr"
|
336 |
|
|
} else {
|
337 |
|
|
fail "$testname: ldc.w ..., exr ($x)"
|
338 |
|
|
}
|
339 |
|
|
}
|
340 |
|
|
default { fail "$testname: ldc.w ..., exr ($x)" }
|
341 |
|
|
}
|
342 |
|
|
|
343 |
|
|
set x 0
|
344 |
|
|
expect {
|
345 |
|
|
-re ".* 130 13da 0201" { set x [expr $x+1]; exp_continue; }
|
346 |
|
|
-re ".* 131 13dc 01406990" { set x [expr $x+1]; exp_continue; }
|
347 |
|
|
-re ".* 132 13e0 01406D90" { set x [expr $x+1]; exp_continue; }
|
348 |
|
|
-re ".* 133 13e4 01406F90" { set x [expr $x+1]; exp_continue; }
|
349 |
|
|
-re ".* 133 1234" { set x [expr $x+1]; exp_continue; }
|
350 |
|
|
-re ".* 134 13ea 01407810" { set x [expr $x+1]; exp_continue; }
|
351 |
|
|
-re ".* 134 6BA01234" { set x [expr $x+1]; exp_continue; }
|
352 |
|
|
-re ".* 134 5678" { set x [expr $x+1]; exp_continue; }
|
353 |
|
|
-re ".* 135 13f4 01406B80" { set x [expr $x+1]; exp_continue; }
|
354 |
|
|
-re ".* 135 1234" { set x [expr $x+1]; exp_continue; }
|
355 |
|
|
-re ".* 136 13fa 01406BA0" { set x [expr $x+1]; exp_continue; }
|
356 |
|
|
-re ".* 136 12345678" { set x [expr $x+1]; exp_continue; }
|
357 |
|
|
-re ".* 137 " {
|
358 |
|
|
if [expr $x == 12] then {
|
359 |
|
|
pass "$testname: stc.w ccr, ..."
|
360 |
|
|
} else {
|
361 |
|
|
fail "$testname: stc.w ccr, ... ($x)"
|
362 |
|
|
}
|
363 |
|
|
}
|
364 |
|
|
default { fail "$testname: stc.w ccr, ... ($x)" }
|
365 |
|
|
}
|
366 |
|
|
|
367 |
|
|
set x 0
|
368 |
|
|
expect {
|
369 |
|
|
-re ".* 138 1402 0211" { set x [expr $x+1]; exp_continue; }
|
370 |
|
|
-re ".* 139 1404 01416990" { set x [expr $x+1]; exp_continue; }
|
371 |
|
|
-re ".* 140 1408 01416D90" { set x [expr $x+1]; exp_continue; }
|
372 |
|
|
-re ".* 141 140c 01416F90" { set x [expr $x+1]; exp_continue; }
|
373 |
|
|
-re ".* 141 1234" { set x [expr $x+1]; exp_continue; }
|
374 |
|
|
-re ".* 142 1412 01417810" { set x [expr $x+1]; exp_continue; }
|
375 |
|
|
-re ".* 142 6BA01234" { set x [expr $x+1]; exp_continue; }
|
376 |
|
|
-re ".* 142 5678" { set x [expr $x+1]; exp_continue; }
|
377 |
|
|
-re ".* 143 141c 01416B80" { set x [expr $x+1]; exp_continue; }
|
378 |
|
|
-re ".* 143 1234" { set x [expr $x+1]; exp_continue; }
|
379 |
|
|
-re ".* 144 1422 01416BA0" { set x [expr $x+1]; exp_continue; }
|
380 |
|
|
-re ".* 144 12345678" { set x [expr $x+1]; exp_continue; }
|
381 |
|
|
-re ".* 145 " {
|
382 |
|
|
if [expr $x == 12] then {
|
383 |
|
|
pass "$testname: stc.w exr, ..."
|
384 |
|
|
} else {
|
385 |
|
|
fail "$testname: stc.w exr, ... ($x)"
|
386 |
|
|
}
|
387 |
|
|
}
|
388 |
|
|
default { fail "$testname: stc.w exr, ... ($x)" }
|
389 |
|
|
}
|
390 |
|
|
|
391 |
|
|
set x 0
|
392 |
|
|
expect {
|
393 |
|
|
-re ".* 146 142a 0412" { set x [expr $x+1]; exp_continue; }
|
394 |
|
|
-re ".* 147 142c 01410412" { set x [expr $x+1]; exp_continue; }
|
395 |
|
|
-re ".* 148 " {
|
396 |
|
|
if [expr $x == 2] then {
|
397 |
|
|
pass "$testname: orc.b #0x12:8, ..."
|
398 |
|
|
} else {
|
399 |
|
|
fail "$testname: orc.b #0x12:8, ... ($x)"
|
400 |
|
|
}
|
401 |
|
|
}
|
402 |
|
|
default { fail "$testname: orc.b #0x12:8, ... ($x)" }
|
403 |
|
|
}
|
404 |
|
|
|
405 |
|
|
set x 0
|
406 |
|
|
expect {
|
407 |
|
|
-re ".* 149 1430 0512" { set x [expr $x+1]; exp_continue; }
|
408 |
|
|
-re ".* 150 1432 01410512" { set x [expr $x+1]; exp_continue; }
|
409 |
|
|
-re ".* 151 " {
|
410 |
|
|
if [expr $x == 2] then {
|
411 |
|
|
pass "$testname: xorc.b #0x12:8, ..."
|
412 |
|
|
} else {
|
413 |
|
|
fail "$testname: xorc.b #0x12:8, ... ($x)"
|
414 |
|
|
}
|
415 |
|
|
}
|
416 |
|
|
default { fail "$testname: xorc.b #0x12:8, ... ($x)" }
|
417 |
|
|
}
|
418 |
|
|
|
419 |
|
|
set x 0
|
420 |
|
|
expect {
|
421 |
|
|
-re ".* 152 1436 0612" { set x [expr $x+1]; exp_continue; }
|
422 |
|
|
-re ".* 153 1438 01410612" { set x [expr $x+1]; exp_continue; }
|
423 |
|
|
-re ".* 154 " {
|
424 |
|
|
if [expr $x == 2] then {
|
425 |
|
|
pass "$testname: andc.b #0x12:8, ..."
|
426 |
|
|
} else {
|
427 |
|
|
fail "$testname: andc.b #0x12:8, ... ($x)"
|
428 |
|
|
}
|
429 |
|
|
}
|
430 |
|
|
default { fail "$testname: andc.b #0x12:8, ... ($x)" }
|
431 |
|
|
}
|
432 |
|
|
|
433 |
|
|
set x 0
|
434 |
|
|
expect {
|
435 |
|
|
-re ".* 155 143c 0180" { set x [expr $x+1]; exp_continue; }
|
436 |
|
|
-re ".* 156 " {
|
437 |
|
|
if [expr $x == 1] then {
|
438 |
|
|
pass "$testname: sleep"
|
439 |
|
|
} else {
|
440 |
|
|
fail "$testname: sleep ($x)"
|
441 |
|
|
}
|
442 |
|
|
}
|
443 |
|
|
default { fail "$testname: sleep ($x)" }
|
444 |
|
|
}
|
445 |
|
|
|
446 |
|
|
set x 0
|
447 |
|
|
expect {
|
448 |
|
|
-re ".* 157 143e 0000" { set x [expr $x+1]; exp_continue; }
|
449 |
|
|
-re ".* 158 " {
|
450 |
|
|
if [expr $x == 1] then {
|
451 |
|
|
pass "$testname: nop"
|
452 |
|
|
} else {
|
453 |
|
|
fail "$testname: nop ($x)"
|
454 |
|
|
}
|
455 |
|
|
}
|
456 |
|
|
default { fail "$testname: nop ($x)" }
|
457 |
|
|
}
|
458 |
|
|
|
459 |
|
|
# This was intended to do any cleanup necessary.
|
460 |
|
|
# It kinda looks like it isn't needed, but just
|
461 |
|
|
# in case, please keep it in for now.
|
462 |
|
|
|
463 |
|
|
gas_finish
|
464 |
|
|
|
465 |
|
|
}
|
466 |
|
|
|
467 |
|
|
if [istarget h8300*-*-elf] then {
|
468 |
|
|
# Test advanced h8300sx instructions.
|
469 |
|
|
do_t13_otr_test
|
470 |
|
|
}
|
471 |
|
|
|