GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
[binutils-gdb.git] / gdb / testsuite / gdb.disasm / hppa.exp
blob592172bcf7d2b22ef9c7f5b81cc96ddcfe2ea348
2 # Copyright 1992-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # This file was written by Jeff Law. (law@cs.utah.edu)
19 require {istarget "hppa*-*-*"}
21 set testfile "hppa"
22 set srcfile ${srcdir}/${subdir}/${testfile}.s
23 set binfile ${objdir}/${subdir}/${testfile}
24 set comp_output [gdb_compile "${srcfile}" "${binfile}" executable ""]
25 if { $comp_output != "" } {
26 if [ regexp "Opcode not defined - DIAG" $comp_output] {
27 warning "HP assembler in use--skipping disasm tests"
28 return
29 } else {
30 perror "Couldn't compile ${srcfile}"
31 return -1
35 proc all_integer_memory_tests { } {
36 global gdb_prompt
37 global hex
38 global decimal
40 send_gdb "x/8i integer_memory_tests\n"
41 gdb_expect {
42 -re "
43 .*ldw 0\\(sr0,r4\\),r26.*
44 .*ldh 0\\(sr0,r4\\),r26.*
45 .*ldb 0\\(sr0,r4\\),r26.*
46 .*stw r26,0\\(sr0,r4\\).*
47 .*sth r26,0\\(sr0,r4\\).*
48 .*stb r26,0\\(sr0,r4\\).*
49 .*ldwm 0\\(sr0,r4\\),r26.*
50 .*stwm r26,0\\(sr0,r4\\).*
51 .*$gdb_prompt $" { pass "integer_memory_tests" }
52 -re "$gdb_prompt $" { fail "integer_memory_tests" }
53 timeout { fail "(timeout) integer memory_tests" }
56 send_gdb "x/20i integer_indexing_load\n"
57 gdb_expect {
58 -re "
59 .*ldwx r5\\(sr0,r4\\),r26.*
60 .*ldwx,s r5\\(sr0,r4\\),r26.*
61 .*ldwx,m r5\\(sr0,r4\\),r26.*
62 .*ldwx,sm r5\\(sr0,r4\\),r26.*
63 .*ldhx r5\\(sr0,r4\\),r26.*
64 .*ldhx,s r5\\(sr0,r4\\),r26.*
65 .*ldhx,m r5\\(sr0,r4\\),r26.*
66 .*ldhx,sm r5\\(sr0,r4\\),r26.*
67 .*ldbx r5\\(sr0,r4\\),r26.*
68 .*ldbx,s r5\\(sr0,r4\\),r26.*
69 .*ldbx,m r5\\(sr0,r4\\),r26.*
70 .*ldbx,sm r5\\(sr0,r4\\),r26.*
71 .*ldwax r5\\(r4\\),r26.*
72 .*ldwax,s r5\\(r4\\),r26.*
73 .*ldwax,m r5\\(r4\\),r26.*
74 .*ldwax,sm r5\\(r4\\),r26.*
75 .*ldcwx r5\\(sr0,r4\\),r26.*
76 .*ldcwx,s r5\\(sr0,r4\\),r26.*
77 .*ldcwx,m r5\\(sr0,r4\\),r26.*
78 .*ldcwx,sm r5\\(sr0,r4\\),r26.*
79 .*$gdb_prompt $" { pass "integer_indexing_load" }
80 -re "$gdb_prompt $" { fail "integer_indexing_load" }
81 timeout { fail "(timeout) integer_indexing" }
84 send_gdb "x/15i integer_load_short_memory\n"
85 gdb_expect {
86 -re "
87 .*ldws 0\\(sr0,r4\\),r26.*
88 .*ldws,mb 0\\(sr0,r4\\),r26.*
89 .*ldws,ma 0\\(sr0,r4\\),r26.*
90 .*ldhs 0\\(sr0,r4\\),r26.*
91 .*ldhs,mb 0\\(sr0,r4\\),r26.*
92 .*ldhs,ma 0\\(sr0,r4\\),r26.*
93 .*ldbs 0\\(sr0,r4\\),r26.*
94 .*ldbs,mb 0\\(sr0,r4\\),r26.*
95 .*ldbs,ma 0\\(sr0,r4\\),r26.*
96 .*ldwas 0\\(r4\\),r26.*
97 .*ldwas,mb 0\\(r4\\),r26.*
98 .*ldwas,ma 0\\(r4\\),r26.*
99 .*ldcws 0\\(sr0,r4\\),r26.*
100 .*ldcws,mb 0\\(sr0,r4\\),r26.*
101 .*ldcws,ma 0\\(sr0,r4\\),r26.*
102 .*$gdb_prompt $" { pass "integer_load_short_memory" }
103 -re "$gdb_prompt $" { fail "integer_load_short_memory" }
104 timeout { fail "(timeout) integer_load_short_memory " }
108 send_gdb "x/17i integer_store_short_memory\n"
109 gdb_expect {
110 -re "
111 .*stws r26,0\\(sr0,r4\\).*
112 .*stws,mb r26,0\\(sr0,r4\\).*
113 .*stws,ma r26,0\\(sr0,r4\\).*
114 .*sths r26,0\\(sr0,r4\\).*
115 .*sths,mb r26,0\\(sr0,r4\\).*
116 .*sths,ma r26,0\\(sr0,r4\\).*
117 .*stbs r26,0\\(sr0,r4\\).*
118 .*stbs,mb r26,0\\(sr0,r4\\).*
119 .*stbs,ma r26,0\\(sr0,r4\\).*
120 .*stwas r26,0\\(r4\\).*
121 .*stwas,mb r26,0\\(r4\\).*
122 .*stwas,ma r26,0\\(r4\\).*
123 .*stbys r26,0\\(sr0,r4\\).*
124 .*stbys r26,0\\(sr0,r4\\).*
125 .*stbys,e r26,0\\(sr0,r4\\).*
126 .*stbys,b,m r26,0\\(sr0,r4\\).*
127 .*stbys,e,m r26,0\\(sr0,r4\\).*
128 .*$gdb_prompt $" { pass "integer_store_short_memory" }
129 -re "$gdb_prompt $" { fail "integer_store_short_memory" }
130 timeout { fail "(timeout) integer_short_memory " }
134 proc all_immediate_tests { } {
135 global gdb_prompt
136 global hex
137 global decimal
139 send_gdb "x/3i immediate_tests\n"
140 gdb_expect {
141 -re "
142 .*ldo 5\\(r26\\),r26.*
143 .*ldil -21524800,r26.*
144 .*addil -21524800,r5.*
145 .*$gdb_prompt $" { pass "immedate_tests" }
146 -re "$gdb_prompt $" { fail "immedate_tests" }
147 timeout { fail "(timeout) immedate_tests " }
151 proc all_branch_tests { } {
152 global gdb_prompt
153 global hex
154 global decimal
156 send_gdb "x/10i branch_tests_1\n"
157 gdb_expect {
158 -re "
159 .*bl.*,rp.*
160 .*bl,n.*,rp.*
161 .*b.*
162 .*b,n.*
163 .*gate.*,rp.*
164 .*gate,n.*,rp.*
165 .*blr r4,rp.*
166 .*blr,n r4,rp.*
167 .*blr r4,r0.*
168 .*blr,n r4,r0.*
169 .*$gdb_prompt $" { pass "branch_tests_1" }
170 -re "$gdb_prompt $" { fail "branch_tests_1" }
171 timeout { fail "(timeout) branch_tests_1" }
174 send_gdb "x/6i branch_tests_2\n"
175 gdb_expect {
176 -re "
177 .*bv r0\\(rp\\).*
178 .*bv,n r0\\(rp\\).*
179 .*be 1234\\(sr1,rp\\).*
180 .*be,n 1234\\(sr1,rp\\).*
181 .*ble 1234\\(sr1,rp\\).*
182 .*ble,n 1234\\(sr1,rp\\).*
183 .*$gdb_prompt $" { pass "branch_tests_2" }
184 -re "$gdb_prompt $" { fail "branch_tests_2" }
185 timeout { fail "(timeout) branch_tests_2" }
189 send_gdb "x/8i movb_tests\n"
190 gdb_expect {
191 -re "
192 .*movb r4,r26,.* <movb_tests>.*
193 .*movb,= r4,r26,.* <movb_tests>.*
194 .*movb,< r4,r26,.* <movb_tests>.*
195 .*movb,od r4,r26,.* <movb_tests>.*
196 .*movb,tr r4,r26,.* <movb_tests>.*
197 .*movb,<> r4,r26,.* <movb_tests>.*
198 .*movb,>= r4,r26,.* <movb_tests>.*
199 .*movb,ev r4,r26,.* <movb_tests>.*
200 .*$gdb_prompt $" { pass "movb_tests" }
201 -re "$gdb_prompt $" { fail "movb_tests" }
202 timeout { fail "(timeout) movb_tests " }
205 send_gdb "x/8i movb_nullified_tests\n"
206 gdb_expect {
207 -re "
208 .*movb,n.*r4,r26,.* <movb_tests>.*
209 .*movb,=,n.*r4,r26,.* <movb_tests>.*
210 .*movb,<,n.*r4,r26,.* <movb_tests>.*
211 .*movb,od,n.*r4,r26,.* <movb_tests>.*
212 .*movb,tr,n.*r4,r26,.* <movb_tests>.*
213 .*movb,<>,n.*r4,r26,.* <movb_tests>.*
214 .*movb,>=,n.*r4,r26,.* <movb_tests>.*
215 .*movb,ev,n.*r4,r26,.* <movb_tests>.*
216 .*$gdb_prompt $" { pass "movb_nullified_tests" }
217 -re "$gdb_prompt $" { fail "movb_nullified_tests" }
218 timeout { fail "(timeout) movb_nullified_tests " }
221 send_gdb "x/8i movib_tests\n"
222 gdb_expect {
223 -re "
224 .*movib 5,r26,.* <movib_tests>.*
225 .*movib,= 5,r26,.* <movib_tests>.*
226 .*movib,< 5,r26,.* <movib_tests>.*
227 .*movib,od 5,r26,.* <movib_tests>.*
228 .*movib,tr 5,r26,.* <movib_tests>.*
229 .*movib,<> 5,r26,.* <movib_tests>.*
230 .*movib,>= 5,r26,.* <movib_tests>.*
231 .*movib,ev 5,r26,.* <movib_tests>.*
232 .*$gdb_prompt $" { pass "movib_tests" }
233 -re "$gdb_prompt $" { fail "movib_tests" }
234 timeout { fail "(timeout) movib_tests " }
237 send_gdb "x/8i movib_nullified_tests\n"
238 gdb_expect {
239 -re "
240 .*movib,n.*5,r26,.* <movib_tests>.*
241 .*movib,=,n.*5,r26,.* <movib_tests>.*
242 .*movib,<,n.*5,r26,.* <movib_tests>.*
243 .*movib,od,n.*5,r26,.* <movib_tests>.*
244 .*movib,tr,n.*5,r26,.* <movib_tests>.*
245 .*movib,<>,n.*5,r26,.* <movib_tests>.*
246 .*movib,>=,n.*5,r26,.* <movib_tests>.*
247 .*movib,ev,n.*5,r26,.* <movib_tests>.*
248 .*$gdb_prompt $" { pass "movib_nullified_tests" }
249 -re "$gdb_prompt $" { fail "movib_nullified_tests" }
250 timeout { fail "(timeout) movib_nullified_tests " }
253 send_gdb "x/8i comb_tests_1\n"
254 gdb_expect {
255 -re "
256 .*comb r0,r4,.* <comb_tests_1>.*
257 .*comb,= r0,r4,.* <comb_tests_1>.*
258 .*comb,< r0,r4,.* <comb_tests_1>.*
259 .*comb,<= r0,r4,.* <comb_tests_1>.*
260 .*comb,<< r0,r4,.* <comb_tests_1>.*
261 .*comb,<<= r0,r4,.* <comb_tests_1>.*
262 .*comb,sv r0,r4,.* <comb_tests_1>.*
263 .*comb,od r0,r4,.* <comb_tests_1>.*
264 .*$gdb_prompt $" { pass "comb_tests_1" }
265 -re "$gdb_prompt $" { fail "comb_tests_1" }
266 timeout { fail "(timeout) comb_tests_1" }
269 send_gdb "x/8i comb_tests_2\n"
270 gdb_expect {
271 -re "
272 .*combf r0,r4,.* <comb_tests_2>.*
273 .*combf,= r0,r4,.* <comb_tests_2>.*
274 .*combf,< r0,r4,.* <comb_tests_2>.*
275 .*combf,<= r0,r4,.* <comb_tests_2>.*
276 .*combf,<< r0,r4,.* <comb_tests_2>.*
277 .*combf,<<= r0,r4,.* <comb_tests_2>.*
278 .*combf,sv r0,r4,.* <comb_tests_2>.*
279 .*combf,od r0,r4,.* <comb_tests_2>.*
280 .*$gdb_prompt $" { pass "comb_tests_2" }
281 -re "$gdb_prompt $" { fail "comb_tests_2" }
282 timeout { fail "(timeout) comb_tests_2" }
285 send_gdb "x/8i comb_nullified_tests_1\n"
286 gdb_expect {
287 -re "
288 .*comb,n r0,r4,.* <comb_tests_1>.*
289 .*comb,=,n r0,r4,.* <comb_tests_1>.*
290 .*comb,<,n r0,r4,.* <comb_tests_1>.*
291 .*comb,<=,n r0,r4,.* <comb_tests_1>.*
292 .*comb,<<,n r0,r4,.* <comb_tests_1>.*
293 .*comb,<<=,n r0,r4,.* <comb_tests_1>.*
294 .*comb,sv,n r0,r4,.* <comb_tests_1>.*
295 .*comb,od,n r0,r4,.* <comb_tests_1>.*
296 .*$gdb_prompt $" { pass "comb_nullified_tests_1" }
297 -re "$gdb_prompt $" { fail "comb_nullified_tests_1" }
298 timeout { fail "(timeout) comb_nullified_tests_1" }
301 send_gdb "x/8i comb_nullified_tests_2\n"
302 gdb_expect {
303 -re "
304 .*combf,n r0,r4,.* <comb_tests_2>.*
305 .*combf,=,n r0,r4,.* <comb_tests_2>.*
306 .*combf,<,n r0,r4,.* <comb_tests_2>.*
307 .*combf,<=,n r0,r4,.* <comb_tests_2>.*
308 .*combf,<<,n r0,r4,.* <comb_tests_2>.*
309 .*combf,<<=,n r0,r4,.* <comb_tests_2>.*
310 .*combf,sv,n r0,r4,.* <comb_tests_2>.*
311 .*combf,od,n r0,r4,.* <comb_tests_2>.*
312 .*$gdb_prompt $" { pass "comb_nullified_tests_2" }
313 -re "$gdb_prompt $" { fail "comb_nullified_tests_2" }
314 timeout { fail "(timeout) comb_nullified_tests_2" }
317 send_gdb "x/8i comib_tests_1\n"
318 gdb_expect {
319 -re "
320 .*comib 0,r4,.* <comib_tests_1>.*
321 .*comib,= 0,r4,.* <comib_tests_1>.*
322 .*comib,< 0,r4,.* <comib_tests_1>.*
323 .*comib,<= 0,r4,.* <comib_tests_1>.*
324 .*comib,<< 0,r4,.* <comib_tests_1>.*
325 .*comib,<<= 0,r4,.* <comib_tests_1>.*
326 .*comib,sv 0,r4,.* <comib_tests_1>.*
327 .*comib,od 0,r4,.* <comib_tests_1>.*
328 .*$gdb_prompt $" { pass "comib_tests_1" }
329 -re "$gdb_prompt $" { fail "comib_tests_1" }
330 timeout { fail "(timeout) comib_tests_1" }
333 send_gdb "x/8i comib_tests_2\n"
334 gdb_expect {
335 -re "
336 .*comibf 0,r4,.* <comib_tests_2>.*
337 .*comibf,= 0,r4,.* <comib_tests_2>.*
338 .*comibf,< 0,r4,.* <comib_tests_2>.*
339 .*comibf,<= 0,r4,.* <comib_tests_2>.*
340 .*comibf,<< 0,r4,.* <comib_tests_2>.*
341 .*comibf,<<= 0,r4,.* <comib_tests_2>.*
342 .*comibf,sv 0,r4,.* <comib_tests_2>.*
343 .*comibf,od 0,r4,.* <comib_tests_2>.*
344 .*$gdb_prompt $" { pass "comib_tests_2" }
345 -re "$gdb_prompt $" { fail "comib_tests_2" }
346 timeout { fail "(timeout) comib_tests_2" }
349 send_gdb "x/8i comib_nullified_tests_1\n"
350 gdb_expect {
351 -re "
352 .*comib,n 0,r4,.* <comib_tests_1>.*
353 .*comib,=,n 0,r4,.* <comib_tests_1>.*
354 .*comib,<,n 0,r4,.* <comib_tests_1>.*
355 .*comib,<=,n 0,r4,.* <comib_tests_1>.*
356 .*comib,<<,n 0,r4,.* <comib_tests_1>.*
357 .*comib,<<=,n 0,r4,.* <comib_tests_1>.*
358 .*comib,sv,n 0,r4,.* <comib_tests_1>.*
359 .*comib,od,n 0,r4,.* <comib_tests_1>.*
360 .*$gdb_prompt $" { pass "comib_nullified_tests_1" }
361 -re "$gdb_prompt $" { fail "comib_nullified_tests_1" }
362 timeout { fail "(timeout) comib_nullified_tests_1" }
365 send_gdb "x/8i comib_nullified_tests_2\n"
366 gdb_expect {
367 -re "
368 .*comibf,n 0,r4,.* <comib_tests_2>.*
369 .*comibf,=,n 0,r4,.* <comib_tests_2>.*
370 .*comibf,<,n 0,r4,.* <comib_tests_2>.*
371 .*comibf,<=,n 0,r4,.* <comib_tests_2>.*
372 .*comibf,<<,n 0,r4,.* <comib_tests_2>.*
373 .*comibf,<<=,n 0,r4,.* <comib_tests_2>.*
374 .*comibf,sv,n 0,r4,.* <comib_tests_2>.*
375 .*comibf,od,n 0,r4,.* <comib_tests_2>.*
376 .*$gdb_prompt $" { pass "comib_nullified_tests_2" }
377 -re "$gdb_prompt $" { fail "comib_nullified_tests_2" }
378 timeout { fail "(timeout) comib_nullified_tests_2" }
381 send_gdb "x/8i addb_tests_1\n"
382 gdb_expect {
383 -re "
384 .*addb r1,r4,.* <addb_tests_1>.*
385 .*addb,= r1,r4,.* <addb_tests_1>.*
386 .*addb,< r1,r4,.* <addb_tests_1>.*
387 .*addb,<= r1,r4,.* <addb_tests_1>.*
388 .*addb,nuv r1,r4,.* <addb_tests_1>.*
389 .*addb,znv r1,r4,.* <addb_tests_1>.*
390 .*addb,sv r1,r4,.* <addb_tests_1>.*
391 .*addb,od r1,r4,.* <addb_tests_1>.*
392 .*$gdb_prompt $" { pass "addb_tests_1" }
393 -re "$gdb_prompt $" { fail "addb_tests_1" }
394 timeout { fail "(timeout) addb_tests_1" }
397 send_gdb "x/8i addb_tests_2\n"
398 gdb_expect {
399 -re "
400 .*addbf r1,r4,.* <addb_tests_2>.*
401 .*addbf,= r1,r4,.* <addb_tests_2>.*
402 .*addbf,< r1,r4,.* <addb_tests_2>.*
403 .*addbf,<= r1,r4,.* <addb_tests_2>.*
404 .*addbf,nuv r1,r4,.* <addb_tests_2>.*
405 .*addbf,znv r1,r4,.* <addb_tests_2>.*
406 .*addbf,sv r1,r4,.* <addb_tests_2>.*
407 .*addbf,od r1,r4,.* <addb_tests_2>.*
408 .*$gdb_prompt $" { pass "addb_tests_2" }
409 -re "$gdb_prompt $" { fail "addb_tests_2" }
410 timeout { fail "(timeout) addb_tests_2" }
413 send_gdb "x/8i addb_nullified_tests_1\n"
414 gdb_expect {
415 -re "
416 .*addb,n r1,r4,.* <addb_tests_1>.*
417 .*addb,=,n r1,r4,.* <addb_tests_1>.*
418 .*addb,<,n r1,r4,.* <addb_tests_1>.*
419 .*addb,<=,n r1,r4,.* <addb_tests_1>.*
420 .*addb,nuv,n r1,r4,.* <addb_tests_1>.*
421 .*addb,znv,n r1,r4,.* <addb_tests_1>.*
422 .*addb,sv,n r1,r4,.* <addb_tests_1>.*
423 .*addb,od,n r1,r4,.* <addb_tests_1>.*
424 .*$gdb_prompt $" { pass "addb_nullified_tests_1" }
425 -re "$gdb_prompt $" { fail "addb_nullified_tests_1" }
426 timeout { fail "(timeout) addb_nullified_tests_1" }
429 send_gdb "x/8i addb_nullified_tests_2\n"
430 gdb_expect {
431 -re "
432 .*addbf,n r1,r4,.* <addb_tests_2>.*
433 .*addbf,=,n r1,r4,.* <addb_tests_2>.*
434 .*addbf,<,n r1,r4,.* <addb_tests_2>.*
435 .*addbf,<=,n r1,r4,.* <addb_tests_2>.*
436 .*addbf,nuv,n r1,r4,.* <addb_tests_2>.*
437 .*addbf,znv,n r1,r4,.* <addb_tests_2>.*
438 .*addbf,sv,n r1,r4,.* <addb_tests_2>.*
439 .*addbf,od,n r1,r4,.* <addb_tests_2>.*
440 .*$gdb_prompt $" { pass "addb_nullified_tests_2" }
441 -re "$gdb_prompt $" { fail "addb_nullified_tests_2" }
442 timeout { fail "(timeout) addb_nullified_tests_2" }
445 send_gdb "x/8i addib_tests_1\n"
446 gdb_expect {
447 -re "
448 .*addib -1,r4,.* <addib_tests_1>.*
449 .*addib,= -1,r4,.* <addib_tests_1>.*
450 .*addib,< -1,r4,.* <addib_tests_1>.*
451 .*addib,<= -1,r4,.* <addib_tests_1>.*
452 .*addib,nuv -1,r4,.* <addib_tests_1>.*
453 .*addib,znv -1,r4,.* <addib_tests_1>.*
454 .*addib,sv -1,r4,.* <addib_tests_1>.*
455 .*addib,od -1,r4,.* <addib_tests_1>.*
456 .*$gdb_prompt $" { pass "addib_tests_1" }
457 -re "$gdb_prompt $" { fail "addib_tests_1" }
458 timeout { fail "(timeout) addib_tests_1" }
461 send_gdb "x/8i addib_tests_2\n"
462 gdb_expect {
463 -re "
464 .*addibf -1,r4,.* <addib_tests_2>.*
465 .*addibf,= -1,r4,.* <addib_tests_2>.*
466 .*addibf,< -1,r4,.* <addib_tests_2>.*
467 .*addibf,<= -1,r4,.* <addib_tests_2>.*
468 .*addibf,nuv -1,r4,.* <addib_tests_2>.*
469 .*addibf,znv -1,r4,.* <addib_tests_2>.*
470 .*addibf,sv -1,r4,.* <addib_tests_2>.*
471 .*addibf,od -1,r4,.* <addib_tests_2>.*
472 .*$gdb_prompt $" { pass "addib_tests_2" }
473 -re "$gdb_prompt $" { fail "addib_tests_2" }
474 timeout { fail "(timeout) addib_tests_2" }
477 send_gdb "x/8i addib_nullified_tests_1\n"
478 gdb_expect {
479 -re "
480 .*addib,n -1,r4,.* <addib_tests_1>.*
481 .*addib,=,n -1,r4,.* <addib_tests_1>.*
482 .*addib,<,n -1,r4,.* <addib_tests_1>.*
483 .*addib,<=,n -1,r4,.* <addib_tests_1>.*
484 .*addib,nuv,n -1,r4,.* <addib_tests_1>.*
485 .*addib,znv,n -1,r4,.* <addib_tests_1>.*
486 .*addib,sv,n -1,r4,.* <addib_tests_1>.*
487 .*addib,od,n -1,r4,.* <addib_tests_1>.*
488 .*$gdb_prompt $" { pass "addb_nullified_tests_1" }
489 -re "$gdb_prompt $" { fail "addb_nullified_tests_1" }
490 timeout { fail "(timeout) addb_nullified_tests_1" }
493 send_gdb "x/8i addib_nullified_tests_2\n"
494 gdb_expect {
495 -re "
496 .*addibf,n -1,r4,.* <addib_tests_2>.*
497 .*addibf,=,n -1,r4,.* <addib_tests_2>.*
498 .*addibf,<,n -1,r4,.* <addib_tests_2>.*
499 .*addibf,<=,n -1,r4,.* <addib_tests_2>.*
500 .*addibf,nuv,n -1,r4,.* <addib_tests_2>.*
501 .*addibf,znv,n -1,r4,.* <addib_tests_2>.*
502 .*addibf,sv,n -1,r4,.* <addib_tests_2>.*
503 .*addibf,od,n -1,r4,.* <addib_tests_2>.*
504 .*$gdb_prompt $" { pass "addb_nullified_tests_2" }
505 -re "$gdb_prompt $" { fail "addb_nullified_tests_2" }
506 timeout { fail "(timeout) addb_nullified_tests_2" }
509 send_gdb "x/8i bb_tests\n"
510 gdb_expect {
511 -re "
512 .*bvb,< r4,.* <bb_tests>.*
513 .*bvb,>= r4,.* <bb_tests>.*
514 .*bvb,<,n r4,.* <bb_tests>.*
515 .*bvb,>=,n r4,.* <bb_tests>.*
516 .*bb,< r4,5,.* <bb_tests>.*
517 .*bb,>= r4,5,.* <bb_tests>.*
518 .*bb,<,n r4,5,.* <bb_tests>.*
519 .*bb,>=,n r4,5,.* <bb_tests>.*
520 .*$gdb_prompt $" { pass "bb_tests" }
521 -re "$gdb_prompt $" { fail "bb_tests" }
522 timeout { fail "(timeout) bb_tests " }
526 proc all_integer_computational_tests { } {
527 global gdb_prompt
528 global hex
529 global decimal
531 set add_insns [list {add} {addl} {addo} {addc} {addco} \
532 {sh1add} {sh1addl} {sh1addo} \
533 {sh2add} {sh2addl} {sh2addo} \
534 {sh3add} {sh3addl} {sh3addo} ]
536 foreach i $add_insns {
537 send_gdb "x/16i $i"; send_gdb "_tests\n"
538 gdb_expect {
539 -re "
540 .*$i r4,r5,r6.*
541 .*$i,= r4,r5,r6.*
542 .*$i,< r4,r5,r6.*
543 .*$i,<= r4,r5,r6.*
544 .*$i,nuv r4,r5,r6.*
545 .*$i,znv r4,r5,r6.*
546 .*$i,sv r4,r5,r6.*
547 .*$i,od r4,r5,r6.*
548 .*$i,tr r4,r5,r6.*
549 .*$i,<> r4,r5,r6.*
550 .*$i,>= r4,r5,r6.*
551 .*$i,> r4,r5,r6.*
552 .*$i,uv r4,r5,r6.*
553 .*$i,vnz r4,r5,r6.*
554 .*$i,nsv r4,r5,r6.*
555 .*$i,ev r4,r5,r6.*
556 .*$gdb_prompt $" { pass "$i tests" }
557 -re "$gdb_prompt $" { fail "$i tests" }
558 timeout { fail "(timeout) $i tests" }
562 set sub_insns [list {sub} {subo} {subb} {subbo} {subt} {subto} \
563 {ds} {comclr} ]
565 foreach i $sub_insns {
566 send_gdb "x/16i $i"; send_gdb "_tests\n"
567 gdb_expect {
568 -re "
569 .*$i r4,r5,r6.*
570 .*$i,= r4,r5,r6.*
571 .*$i,< r4,r5,r6.*
572 .*$i,<= r4,r5,r6.*
573 .*$i,<< r4,r5,r6.*
574 .*$i,<<= r4,r5,r6.*
575 .*$i,sv r4,r5,r6.*
576 .*$i,od r4,r5,r6.*
577 .*$i,tr r4,r5,r6.*
578 .*$i,<> r4,r5,r6.*
579 .*$i,>= r4,r5,r6.*
580 .*$i,> r4,r5,r6.*
581 .*$i,>>= r4,r5,r6.*
582 .*$i,>> r4,r5,r6.*
583 .*$i,nsv r4,r5,r6.*
584 .*$i,ev r4,r5,r6.*
585 .*$gdb_prompt $" { pass "$i tests" }
586 -re "$gdb_prompt $" { fail "$i tests" }
587 timeout { fail "(timeout) $i tests" }
591 set logical_insns [list {or} {xor} {and} {andcm} ]
593 foreach i $logical_insns {
594 send_gdb "x/10i $i"; send_gdb "_tests\n"
595 gdb_expect {
596 -re "
597 .*$i r4,r5,r6.*
598 .*$i,= r4,r5,r6.*
599 .*$i,< r4,r5,r6.*
600 .*$i,<= r4,r5,r6.*
601 .*$i,od r4,r5,r6.*
602 .*$i,tr r4,r5,r6.*
603 .*$i,<> r4,r5,r6.*
604 .*$i,>= r4,r5,r6.*
605 .*$i,> r4,r5,r6.*
606 .*$i,ev r4,r5,r6.*
607 .*$gdb_prompt $" { pass "$i tests" }
608 -re "$gdb_prompt $" { fail "$i tests" }
609 timeout { fail "(timeout) $i tests" }
613 set unit_insns1 [list {uxor} {uaddcm} {uaddcmt} ]
615 foreach i $unit_insns1 {
616 send_gdb "x/12i $i"; send_gdb "_tests\n"
617 gdb_expect {
618 -re "
619 .*$i r4,r5,r6.*
620 .*$i,sbz r4,r5,r6.*
621 .*$i,shz r4,r5,r6.*
622 .*$i,sdc r4,r5,r6.*
623 .*$i,sbc r4,r5,r6.*
624 .*$i,shc r4,r5,r6.*
625 .*$i,tr r4,r5,r6.*
626 .*$i,nbz r4,r5,r6.*
627 .*$i,nhz r4,r5,r6.*
628 .*$i,ndc r4,r5,r6.*
629 .*$i,nbc r4,r5,r6.*
630 .*$i,nhc r4,r5,r6.*
631 .*$gdb_prompt $" { pass "$i tests" }
632 -re "$gdb_prompt $" { fail "$i tests" }
633 timeout { fail "(timeout) $i tests" }
637 set unit_insns2 [list {dcor} {idcor} ]
639 foreach i $unit_insns2 {
640 send_gdb "x/12i $i"; send_gdb "_tests\n"
641 gdb_expect {
642 -re "
643 .*$i r4,r5.*
644 .*$i,sbz r4,r5.*
645 .*$i,shz r4,r5.*
646 .*$i,sdc r4,r5.*
647 .*$i,sbc r4,r5.*
648 .*$i,shc r4,r5.*
649 .*$i,tr r4,r5.*
650 .*$i,nbz r4,r5.*
651 .*$i,nhz r4,r5.*
652 .*$i,ndc r4,r5.*
653 .*$i,nbc r4,r5.*
654 .*$i,nhc r4,r5.*
655 .*$gdb_prompt $" { pass "$i tests" }
656 -re "$gdb_prompt $" { fail "$i tests" }
657 timeout { fail "(timeout) $i tests" }
661 set addi_insns [list {addi} {addio} {addit} {addito} ]
663 foreach i $addi_insns {
664 send_gdb "x/16i $i"; send_gdb "_tests\n"
665 gdb_expect {
666 -re "
667 .*$i 7b,r5,r6.*
668 .*$i,= 7b,r5,r6.*
669 .*$i,< 7b,r5,r6.*
670 .*$i,<= 7b,r5,r6.*
671 .*$i,nuv 7b,r5,r6.*
672 .*$i,znv 7b,r5,r6.*
673 .*$i,sv 7b,r5,r6.*
674 .*$i,od 7b,r5,r6.*
675 .*$i,tr 7b,r5,r6.*
676 .*$i,<> 7b,r5,r6.*
677 .*$i,>= 7b,r5,r6.*
678 .*$i,> 7b,r5,r6.*
679 .*$i,uv 7b,r5,r6.*
680 .*$i,vnz 7b,r5,r6.*
681 .*$i,nsv 7b,r5,r6.*
682 .*$i,ev 7b,r5,r6.*
683 .*$gdb_prompt $" { pass "$i tests" }
684 -re "$gdb_prompt $" { fail "$i tests" }
685 timeout { fail "(timeout) $i tests" }
689 set subi_insns [list {subi} {subio} {comiclr} ]
691 foreach i $subi_insns {
692 send_gdb "x/16i $i"; send_gdb "_tests\n"
693 gdb_expect {
694 -re "
695 .*$i 7b,r5,r6.*
696 .*$i,= 7b,r5,r6.*
697 .*$i,< 7b,r5,r6.*
698 .*$i,<= 7b,r5,r6.*
699 .*$i,<< 7b,r5,r6.*
700 .*$i,<<= 7b,r5,r6.*
701 .*$i,sv 7b,r5,r6.*
702 .*$i,od 7b,r5,r6.*
703 .*$i,tr 7b,r5,r6.*
704 .*$i,<> 7b,r5,r6.*
705 .*$i,>= 7b,r5,r6.*
706 .*$i,> 7b,r5,r6.*
707 .*$i,>>= 7b,r5,r6.*
708 .*$i,>> 7b,r5,r6.*
709 .*$i,nsv 7b,r5,r6.*
710 .*$i,ev 7b,r5,r6.*
711 .*$gdb_prompt $" { pass "$i tests" }
712 -re "$gdb_prompt $" { fail "$i tests" }
713 timeout { fail "(timeout) $i tests" }
717 send_gdb "x/8i vshd_tests\n"
718 gdb_expect {
719 -re "
720 .*vshd r4,r5,r6.*
721 .*vshd,= r4,r5,r6.*
722 .*vshd,< r4,r5,r6.*
723 .*vshd,od r4,r5,r6.*
724 .*vshd,tr r4,r5,r6.*
725 .*vshd,<> r4,r5,r6.*
726 .*vshd,>= r4,r5,r6.*
727 .*vshd,ev r4,r5,r6.*
728 .*$gdb_prompt $" { pass "vshd tests" }
729 -re "$gdb_prompt $" { fail "vshd tests" }
730 timeout { fail "(timeout) "vshd tests" }
733 send_gdb "x/8i shd_tests\n"
734 gdb_expect {
735 -re "
736 .*shd r4,r5,5,r6.*
737 .*shd,= r4,r5,5,r6.*
738 .*shd,< r4,r5,5,r6.*
739 .*shd,od r4,r5,5,r6.*
740 .*shd,tr r4,r5,5,r6.*
741 .*shd,<> r4,r5,5,r6.*
742 .*shd,>= r4,r5,5,r6.*
743 .*shd,ev r4,r5,5,r6.*
744 .*$gdb_prompt $" { pass "shd tests" }
745 -re "$gdb_prompt $" { fail "shd tests" }
746 timeout { fail "(timeout) "shd tests" }
749 set extract_insns1 [list {extru} {extrs} {zdep} {dep} ]
751 foreach i $extract_insns1 {
752 send_gdb "x/8i $i"; send_gdb "_tests\n"
753 gdb_expect {
754 -re "
755 .*$i r4,5,10,r6.*
756 .*$i,= r4,5,10,r6.*
757 .*$i,< r4,5,10,r6.*
758 .*$i,od r4,5,10,r6.*
759 .*$i,tr r4,5,10,r6.*
760 .*$i,<> r4,5,10,r6.*
761 .*$i,>= r4,5,10,r6.*
762 .*$i,ev r4,5,10,r6.*
763 .*$gdb_prompt $" { pass "$i tests" }
764 -re "$gdb_prompt $" { fail "$i tests" }
765 timeout { fail "(timeout) $i tests" }
769 set extract_insns2 [list {vextru} {vextrs} {zvdep} {vdep} ]
771 foreach i $extract_insns2 {
772 send_gdb "x/8i $i"; send_gdb "_tests\n"
773 gdb_expect {
774 -re "
775 .*$i r4,5,r6.*
776 .*$i,= r4,5,r6.*
777 .*$i,< r4,5,r6.*
778 .*$i,od r4,5,r6.*
779 .*$i,tr r4,5,r6.*
780 .*$i,<> r4,5,r6.*
781 .*$i,>= r4,5,r6.*
782 .*$i,ev r4,5,r6.*
783 .*$gdb_prompt $" { pass "$i tests" }
784 -re "$gdb_prompt $" { fail "$i tests" }
785 timeout { fail "(timeout) $i tests" }
789 set extract_insns3 [list {vdepi} {zvdepi} ]
791 foreach i $extract_insns3 {
792 send_gdb "x/8i $i"; send_gdb "_tests\n"
793 gdb_expect {
794 -re "
795 .*$i -1,5,r6.*
796 .*$i,= -1,5,r6.*
797 .*$i,< -1,5,r6.*
798 .*$i,od -1,5,r6.*
799 .*$i,tr -1,5,r6.*
800 .*$i,<> -1,5,r6.*
801 .*$i,>= -1,5,r6.*
802 .*$i,ev -1,5,r6.*
803 .*$gdb_prompt $" { pass "$i tests" }
804 -re "$gdb_prompt $" { fail "$i tests" }
805 timeout { fail "(timeout) $i tests" }
809 set extract_insns4 [list {depi} {zdepi} ]
811 foreach i $extract_insns4 {
812 send_gdb "x/8i $i"; send_gdb "_tests\n"
813 gdb_expect {
814 -re "
815 .*$i -1,4,10,r6.*
816 .*$i,= -1,4,10,r6.*
817 .*$i,< -1,4,10,r6.*
818 .*$i,od -1,4,10,r6.*
819 .*$i,tr -1,4,10,r6.*
820 .*$i,<> -1,4,10,r6.*
821 .*$i,>= -1,4,10,r6.*
822 .*$i,ev -1,4,10,r6.*
823 .*$gdb_prompt $" { pass "$i tests" }
824 -re "$gdb_prompt $" { fail "$i tests" }
825 timeout { fail "(timeout) $i tests" }
830 proc all_system_control_tests { } {
831 global gdb_prompt
832 global hex
833 global decimal
835 send_gdb "x/14i system_control_tests\n"
836 gdb_expect {
837 -re "
838 .*break 5,c.*
839 .*rfi.*
840 .*rfir.*
841 .*ssm 5,r4.*
842 .*rsm 5,r4.*
843 .*mtsm r4.*
844 .*ldsid \\(sr0,r5\\),r4.*
845 .*mtsp r4,sr0.*
846 .*mtctl r4,ccr.*
847 .*mfsp sr0,r4.*
848 .*mfctl ccr,r4.*
849 .*sync.*
850 .*syncdma.*
851 .*diag 4d2.*
852 .*$gdb_prompt $" { pass "system_constrol_tests" }
853 -re "$gdb_prompt $" { fail "system_control_tests" }
854 timeout { file "(timeout) system_control_tests" }
857 send_gdb "x/4i probe_tests\n"
858 gdb_expect {
859 -re "
860 .*prober \\(sr0,r5\\),r6,r7.*
861 .*proberi \\(sr0,r5\\),1,r7.*
862 .*probew \\(sr0,r5\\),r6,r7.*
863 .*probewi \\(sr0,r5\\),1,r7.*
864 .*$gdb_prompt $" { pass "probe_tests" }
865 -re "$gdb_prompt $" { fail "probe_tests" }
866 timeout { file "(timeout) probe_tests" }
869 # lci uses the same bit pattern as lha, so accept lha.
870 send_gdb "x/5i lpa_tests\n"
871 gdb_expect {
872 -re "
873 .*lpa r4\\(sr0,r5\\),r6.*
874 .*lpa,m r4\\(sr0,r5\\),r6.*
875 .*lha r4\\(sr0,r5\\),r6.*
876 .*lha,m r4\\(sr0,r5\\),r6.*
877 .*lha r4\\(sr0,r5\\),r6.*
878 .*$gdb_prompt $" { pass "lpa_tests" }
879 -re "$gdb_prompt $" { fail "lpa_tests" }
880 timeout { file "(timeout) lpa_tests" }
883 send_gdb "x/18i purge_tests\n"
884 gdb_expect {
885 -re "
886 .*pdtlb r4\\(sr0,r5\\).*
887 .*pdtlb,m r4\\(sr0,r5\\).*
888 .*pitlb r4\\(sr0,r5\\).*
889 .*pitlb,m r4\\(sr0,r5\\).*
890 .*pdtlbe r4\\(sr0,r5\\).*
891 .*pdtlbe,m r4\\(sr0,r5\\).*
892 .*pitlbe r4\\(sr0,r5\\).*
893 .*pitlbe,m r4\\(sr0,r5\\).*
894 .*pdc r4\\(sr0,r5\\).*
895 .*pdc,m r4\\(sr0,r5\\).*
896 .*fdc r4\\(sr0,r5\\).*
897 .*fdc,m r4\\(sr0,r5\\).*
898 .*fic r4\\(sr0,r5\\).*
899 .*fic,m r4\\(sr0,r5\\).*
900 .*fdce r4\\(sr0,r5\\).*
901 .*fdce,m r4\\(sr0,r5\\).*
902 .*fice r4\\(sr0,r5\\).*
903 .*fice,m r4\\(sr0,r5\\).*
904 .*$gdb_prompt $" { pass "purge_tests" }
905 -re "$gdb_prompt $" { fail "purge_tests" }
906 timeout { file "(timeout) purge_tests" }
909 send_gdb "x/4i insert_tests\n"
910 gdb_expect {
911 -re "
912 .*idtlba r4,\\(sr0,r5\\).*
913 .*iitlba r4,\\(sr0,r5\\).*
914 .*idtlbp r4,\\(sr0,r5\\).*
915 .*iitlbp r4,\\(sr0,r5\\).*
916 .*$gdb_prompt $" { pass "insert_tests" }
917 -re "$gdb_prompt $" { fail "insert_tests" }
918 timeout { file "(timeout) insert_tests" }
923 proc all_fpu_memory_tests { } {
924 global gdb_prompt
925 global hex
926 global decimal
928 send_gdb "x/20i fpu_memory_indexing_tests\n"
929 gdb_expect {
930 -re "
931 .*fldwx r4\\(sr0,r5\\),fr6.*
932 .*fldwx,s r4\\(sr0,r5\\),fr6.*
933 .*fldwx,m r4\\(sr0,r5\\),fr6.*
934 .*fldwx,sm r4\\(sr0,r5\\),fr6.*
935 .*flddx r4\\(sr0,r5\\),fr6.*
936 .*flddx,s r4\\(sr0,r5\\),fr6.*
937 .*flddx,m r4\\(sr0,r5\\),fr6.*
938 .*flddx,sm r4\\(sr0,r5\\),fr6.*
939 .*fstwx fr6,r4\\(sr0,r5\\).*
940 .*fstwx,s fr6,r4\\(sr0,r5\\).*
941 .*fstwx,m fr6,r4\\(sr0,r5\\).*
942 .*fstwx,sm fr6,r4\\(sr0,r5\\).*
943 .*fstdx fr6,r4\\(sr0,r5\\).*
944 .*fstdx,s fr6,r4\\(sr0,r5\\).*
945 .*fstdx,m fr6,r4\\(sr0,r5\\).*
946 .*fstdx,sm fr6,r4\\(sr0,r5\\).*
947 .*fstqx fr6,r4\\(sr0,r5\\).*
948 .*fstqx,s fr6,r4\\(sr0,r5\\).*
949 .*fstqx,m fr6,r4\\(sr0,r5\\).*
950 .*fstqx,sm fr6,r4\\(sr0,r5\\).*
951 .*$gdb_prompt $" { pass "fpu_memory_indexing_tests" }
952 -re "$gdb_prompt $" { fail "fpu_memory_indexing_tests" }
953 timeout { file "(timeout) fpu_memory_indexing_tests" }
956 send_gdb "x/15i fpu_short_memory_tests\n"
957 gdb_expect {
958 -re "
959 .*fldws 0\\(sr0,r5\\),fr6.*
960 .*fldws,mb 0\\(sr0,r5\\),fr6.*
961 .*fldws,ma 0\\(sr0,r5\\),fr6.*
962 .*fldds 0\\(sr0,r5\\),fr6.*
963 .*fldds,mb 0\\(sr0,r5\\),fr6.*
964 .*fldds,ma 0\\(sr0,r5\\),fr6.*
965 .*fstws fr6,0\\(sr0,r5\\).*
966 .*fstws,mb fr6,0\\(sr0,r5\\).*
967 .*fstws,ma fr6,0\\(sr0,r5\\).*
968 .*fstds fr6,0\\(sr0,r5\\).*
969 .*fstds,mb fr6,0\\(sr0,r5\\).*
970 .*fstds,ma fr6,0\\(sr0,r5\\).*
971 .*fstqs fr6,0\\(sr0,r5\\).*
972 .*fstqs,mb fr6,0\\(sr0,r5\\).*
973 .*fstqs,ma fr6,0\\(sr0,r5\\).*
974 .*$gdb_prompt $" { pass "fpu_short_memory_tests" }
975 -re "$gdb_prompt $" { fail "fpu_short_memory_tests" }
976 timeout { file "(timeout) fpu_short_memory_tests" }
981 proc all_fpu_computational_tests { } {
982 global gdb_prompt
983 global hex
984 global decimal
986 send_gdb "x/1i fpu_misc_tests\n"
987 gdb_expect {
988 -re "
989 .*ftest.*
990 .*$gdb_prompt $" { pass "fpu_misc_tests" }
991 -re "$gdb_prompt $" { fail "fpu_misc_tests" }
992 timeout { file "(timeout) fpu_misc_tests" }
995 set fpu_two_op_insns [list {fcpy} {fabs} {fsqrt} {frnd} ]
997 foreach i $fpu_two_op_insns {
998 send_gdb "x/5i $i"; send_gdb "_tests\n"
999 gdb_expect {
1000 -re "
1001 .*$i,sgl fr5,fr10.*
1002 .*$i,dbl fr5,fr10.*
1003 .*$i,quad fr5,fr10.*
1004 .*$i,sgl fr20,fr24.*
1005 .*$i,dbl fr20,fr24.*
1006 .*$gdb_prompt $" { pass "$i tests" }
1007 -re "$gdb_prompt $" { fail "$i tests" }
1008 timeout { fail "(timeout) $i tests" }
1012 set fpu_conversions [list {fcnvff} {fcnvxf} {fcnvfx} {fcnvfxt} ]
1014 foreach i $fpu_conversions {
1015 send_gdb "x/18i $i"; send_gdb "_tests\n"
1016 gdb_expect {
1017 -re "
1018 .*$i,sgl,sgl fr5,fr10.*
1019 .*$i,sgl,dbl fr5,fr10.*
1020 .*$i,sgl,quad fr5,fr10.*
1021 .*$i,dbl,sgl fr5,fr10.*
1022 .*$i,dbl,dbl fr5,fr10.*
1023 .*$i,dbl,quad fr5,fr10.*
1024 .*$i,quad,sgl fr5,fr10.*
1025 .*$i,quad,dbl fr5,fr10.*
1026 .*$i,quad,quad fr5,fr10.*
1027 .*$i,sgl,sgl fr20,fr24.*
1028 .*$i,sgl,dbl fr20,fr24.*
1029 .*$i,sgl,quad fr20,fr24.*
1030 .*$i,dbl,sgl fr20,fr24.*
1031 .*$i,dbl,dbl fr20,fr24.*
1032 .*$i,dbl,quad fr20,fr24.*
1033 .*$i,quad,sgl fr20,fr24.*
1034 .*$i,quad,dbl fr20,fr24.*
1035 .*$i,quad,quad fr20,fr24.*
1036 .*$gdb_prompt $" { pass "$i tests" }
1037 -re "$gdb_prompt $" { fail "$i tests" }
1038 timeout { fail "(timeout) $i tests" }
1042 set fpu_three_op_insns [list {fadd} {fsub} {fmpy} {fdiv} {frem} ]
1044 foreach i $fpu_three_op_insns {
1045 send_gdb "x/6i $i"; send_gdb "_tests\n"
1046 gdb_expect {
1047 -re "
1048 .*$i,sgl fr4,fr8,fr12.*
1049 .*$i,dbl fr4,fr8,fr12.*
1050 .*$i,quad fr4,fr8,fr12.*
1051 .*$i,sgl fr20,fr24,fr28.*
1052 .*$i,dbl fr20,fr24,fr28.*
1053 .*$i,quad fr20,fr24,fr28.*
1054 .*$gdb_prompt $" { pass "$i tests" }
1055 -re "$gdb_prompt $" { fail "$i tests" }
1056 timeout { fail "(timeout) $i tests" }
1060 send_gdb "x/4i fmpy_addsub_tests\n"
1061 gdb_expect {
1062 -re "
1063 .*fmpyadd,sgl fr16,fr17,fr18,fr19,fr20.*
1064 .*fmpyadd,dbl fr16,fr17,fr18,fr19,fr20.*
1065 .*fmpysub,sgl fr16,fr17,fr18,fr19,fr20.*
1066 .*fmpysub,dbl fr16,fr17,fr18,fr19,fr20.*
1067 .*$gdb_prompt $" { pass "fmpy_addsub_tests" }
1068 -re "$gdb_prompt $" { fail "fmpy_addsub_tests" }
1069 timeout { fail "(timeout) fmpy_addsub_tests" }
1072 send_gdb "x/i xmpyu_tests\n"
1073 gdb_expect {
1074 -re "
1075 .*xmpyu fr4,fr5,fr6.*
1076 .*$gdb_prompt $" {pass "xmpyu_tests" }
1077 -re "$gdb_prompt $" {fail "xmpyu_tests" }
1078 timeout { fail "(timeout) xmpyu_tests" }
1083 proc all_fpu_comparison_tests { } {
1084 global gdb_prompt
1085 global hex
1086 global decimal
1088 set fpu_comparison_formats [list {sgl} {dbl} {quad} ]
1090 foreach i $fpu_comparison_formats {
1091 send_gdb "x/8i fcmp_$i"; send_gdb "_tests_1\n"
1092 gdb_expect {
1093 -re "
1094 .*fcmp,$i,false\\? fr4,fr5.*
1095 .*fcmp,$i,false fr4,fr5.*
1096 .*fcmp,$i,\\? fr4,fr5.*
1097 .*fcmp,$i,!<=> fr4,fr5.*
1098 .*fcmp,$i,= fr4,fr5.*
1099 .*fcmp,$i,=t fr4,fr5.*
1100 .*fcmp,$i,\\?= fr4,fr5.*
1101 .*fcmp,$i,!<> fr4,fr5.*
1102 .*$gdb_prompt $" { pass "$i tests (part1) " }
1103 -re "$gdb_prompt $" { fail "fcmp_$i tests (part1) " }
1104 timeout { fail "(timeout) fcmp_$i tests (part1) " }
1107 send_gdb "x/8i fcmp_$i"; send_gdb "_tests_2\n"
1108 gdb_expect {
1109 -re "
1110 .*fcmp,$i,!\\?>= fr4,fr5.*
1111 .*fcmp,$i,< fr4,fr5.*
1112 .*fcmp,$i,\\?< fr4,fr5.*
1113 .*fcmp,$i,!>= fr4,fr5.*
1114 .*fcmp,$i,!\\?> fr4,fr5.*
1115 .*fcmp,$i,<= fr4,fr5.*
1116 .*fcmp,$i,\\?<= fr4,fr5.*
1117 .*fcmp,$i,!> fr4,fr5.*
1118 .*$gdb_prompt $" { pass "$i tests (part2) " }
1119 -re "$gdb_prompt $" { fail "fcmp_$i tests (part2) " }
1120 timeout { fail "(timeout) fcmp_$i tests (part2) " }
1123 send_gdb "x/8i fcmp_$i"; send_gdb "_tests_3\n"
1124 gdb_expect {
1125 -re "
1126 .*fcmp,$i,!\\?<= fr4,fr5.*
1127 .*fcmp,$i,> fr4,fr5.*
1128 .*fcmp,$i,\\?> fr4,fr5.*
1129 .*fcmp,$i,!<= fr4,fr5.*
1130 .*fcmp,$i,!\\?< fr4,fr5.*
1131 .*fcmp,$i,>= fr4,fr5.*
1132 .*fcmp,$i,\\?>= fr4,fr5.*
1133 .*fcmp,$i,!< fr4,fr5.*
1134 .*$gdb_prompt $" { pass "$i tests (part3) " }
1135 -re "$gdb_prompt $" { fail "fcmp_$i tests (part3) " }
1136 timeout { fail "(timeout) fcmp_$i tests (part3) " }
1139 send_gdb "x/8i fcmp_$i"; send_gdb "_tests_4\n"
1140 gdb_expect {
1141 -re "
1142 .*fcmp,$i,!\\?= fr4,fr5.*
1143 .*fcmp,$i,<> fr4,fr5.*
1144 .*fcmp,$i,!= fr4,fr5.*
1145 .*fcmp,$i,!=t fr4,fr5.*
1146 .*fcmp,$i,!\\? fr4,fr5.*
1147 .*fcmp,$i,<=> fr4,fr5.*
1148 .*fcmp,$i,true\\? fr4,fr5.*
1149 .*fcmp,$i,true fr4,fr5.*
1150 .*$gdb_prompt $" { pass "$i tests (part4) " }
1151 -re "$gdb_prompt $" { fail "fcmp_$i tests (part4) " }
1152 timeout { fail "(timeout) fcmp_$i tests (part4) " }
1157 proc all_special_tests { } {
1158 global gdb_prompt
1159 global hex
1160 global decimal
1162 send_gdb "x/4i special_tests\n"
1163 gdb_expect {
1164 -re "
1165 .*gfw r4\\(sr0,r5\\).*
1166 .*gfw,m r4\\(sr0,r5\\).*
1167 .*gfr r4\\(sr0,r5\\).*
1168 .*gfr,m r4\\(sr0,r5\\).*
1169 .*$gdb_prompt $" { pass "special tests" }
1170 -re "$gdb_prompt $" { fail "special tests" }
1171 timeout { fail "(timeout) special tests " }
1176 proc all_sfu_tests { } {
1177 global gdb_prompt
1178 global hex
1179 global decimal
1181 send_gdb "x/16i sfu_tests\n"
1182 gdb_expect {
1183 -re "
1184 .*spop0,4,5.*
1185 .*spop0,4,73.*
1186 .*spop0,4,5,n.*
1187 .*spop0,4,73,n.*
1188 .*spop1,4,5 r5.*
1189 .*spop1,4,73 r5.*
1190 .*spop1,4,5,n r5.*
1191 .*spop1,4,73,n r5.*
1192 .*spop2,4,5 r5.*
1193 .*spop2,4,73 r5.*
1194 .*spop2,4,5,n r5.*
1195 .*spop2,4,73,n r5.*
1196 .*spop3,4,5 r5,r6.*
1197 .*spop3,4,73 r5,r6.*
1198 .*spop3,4,5,n r5,r6.*
1199 .*spop3,4,73,n r5,r6.*
1200 .*$gdb_prompt $" { pass "sfu tests" }
1201 -re "$gdb_prompt $" { fail "sfu tests" }
1202 timeout { fail "(timeout) sfu tests " }
1206 proc all_copr_tests { } {
1207 global gdb_prompt
1208 global hex
1209 global decimal
1211 send_gdb "x/4i copr_tests\n"
1212 gdb_expect {
1213 -re "
1214 .*copr,4,5.*
1215 .*copr,4,73.*
1216 .*copr,4,5,n.*
1217 .*copr,4,73,n.*
1218 .*$gdb_prompt $" { pass "copr tests" }
1219 -re "$gdb_prompt $" { fail "copr tests" }
1220 timeout { fail "(timeout) copr tests " }
1224 proc all_copr_mem_tests { } {
1225 global gdb_prompt
1226 global hex
1227 global decimal
1229 send_gdb "x/8i copr_indexing_load\n"
1230 gdb_expect {
1231 -re "
1232 .*cldwx,4 r5\\(sr0,r4\\),r26.*
1233 .*cldwx,4,s r5\\(sr0,r4\\),r26.*
1234 .*cldwx,4,m r5\\(sr0,r4\\),r26.*
1235 .*cldwx,4,sm r5\\(sr0,r4\\),r26.*
1236 .*clddx,4 r5\\(sr0,r4\\),r26.*
1237 .*clddx,4,s r5\\(sr0,r4\\),r26.*
1238 .*clddx,4,m r5\\(sr0,r4\\),r26.*
1239 .*clddx,4,sm r5\\(sr0,r4\\),r26.*
1240 .*$gdb_prompt $" { pass "copr indexed load tests" }
1241 -re "$gdb_prompt $" { fail "copr indexed load tests" }
1242 timeout { fail "(timeout) copr indexed load tests " }
1245 send_gdb "x/8i copr_indexing_store\n"
1246 gdb_expect {
1247 -re "
1248 .*cstwx,4 r26,r5\\(sr0,r4\\).*
1249 .*cstwx,4,s r26,r5\\(sr0,r4\\).*
1250 .*cstwx,4,m r26,r5\\(sr0,r4\\).*
1251 .*cstwx,4,sm r26,r5\\(sr0,r4\\).*
1252 .*cstdx,4 r26,r5\\(sr0,r4\\).*
1253 .*cstdx,4,s r26,r5\\(sr0,r4\\).*
1254 .*cstdx,4,m r26,r5\\(sr0,r4\\).*
1255 .*cstdx,4,sm r26,r5\\(sr0,r4\\).*
1256 .*$gdb_prompt $" { pass "copr indexed store tests" }
1257 -re "$gdb_prompt $" { fail "copr indexed store tests" }
1258 timeout { fail "(timeout) copr indexed load tests " }
1261 send_gdb "x/12i copr_short_memory\n"
1262 gdb_expect {
1263 -re "
1264 .*cldws,4 0\\(sr0,r4\\),r26.*
1265 .*cldws,4,mb 0\\(sr0,r4\\),r26.*
1266 .*cldws,4,ma 0\\(sr0,r4\\),r26.*
1267 .*cldds,4 0\\(sr0,r4\\),r26.*
1268 .*cldds,4,mb 0\\(sr0,r4\\),r26.*
1269 .*cldds,4,ma 0\\(sr0,r4\\),r26.*
1270 .*cstws,4 r26,0\\(sr0,r4\\).*
1271 .*cstws,4,mb r26,0\\(sr0,r4\\).*
1272 .*cstws,4,ma r26,0\\(sr0,r4\\).*
1273 .*cstds,4 r26,0\\(sr0,r4\\).*
1274 .*cstds,4,mb r26,0\\(sr0,r4\\).*
1275 .*cstds,4,ma r26,0\\(sr0,r4\\).*
1276 .*$gdb_prompt $" { pass "copr short memory tests" }
1277 -re "$gdb_prompt $" { fail "copr short memory tests" }
1278 timeout { fail "(timeout) copr short memory tests " }
1282 proc fmemLRbug_tests { } {
1283 global gdb_prompt
1284 global hex
1285 global decimal
1287 send_gdb "x/12i fmemLRbug_tests_1\n"
1288 gdb_expect {
1289 -re "
1290 .*fstws fr6R,0\\(sr0,r26\\).*
1291 .*fstws fr6,4\\(sr0,r26\\).*
1292 .*fstws fr6,8\\(sr0,r26\\).*
1293 .*fstds fr6,0\\(sr0,r26\\).*
1294 .*fstds fr6,4\\(sr0,r26\\).*
1295 .*fstds fr6,8\\(sr0,r26\\).*
1296 .*fldws 0\\(sr0,r26\\),fr6R.*
1297 .*fldws 4\\(sr0,r26\\),fr6.*
1298 .*fldws 8\\(sr0,r26\\),fr6.*
1299 .*fldds 0\\(sr0,r26\\),fr6.*
1300 .*fldds 4\\(sr0,r26\\),fr6.*
1301 .*fldds 8\\(sr0,r26\\),fr6.*
1302 .*$gdb_prompt $" { pass "fmem LR register selector tests (part1)" }
1303 -re "$gdb_prompt $" { fail "fmem LR register selector tests (part1)" }
1304 timeout { fail "(timeout) fmem LR register selector tests (part1)" }
1307 send_gdb "x/12i fmemLRbug_tests_2\n"
1308 gdb_expect {
1309 -re "
1310 .*fstws fr6R,0\\(sr0,r26\\).*
1311 .*fstws fr6,4\\(sr0,r26\\).*
1312 .*fstws fr6,8\\(sr0,r26\\).*
1313 .*fstds fr6,0\\(sr0,r26\\).*
1314 .*fstds fr6,4\\(sr0,r26\\).*
1315 .*fstds fr6,8\\(sr0,r26\\).*
1316 .*fldws 0\\(sr0,r26\\),fr6R.*
1317 .*fldws 4\\(sr0,r26\\),fr6.*
1318 .*fldws 8\\(sr0,r26\\),fr6.*
1319 .*fldds 0\\(sr0,r26\\),fr6.*
1320 .*fldds 4\\(sr0,r26\\),fr6.*
1321 .*fldds 8\\(sr0,r26\\),fr6.*
1322 .*$gdb_prompt $" { pass "fmem LR register selector tests (part2)" }
1323 -re "$gdb_prompt $" { fail "fmem LR register selector tests (part2)" }
1324 timeout { fail "(timeout) fmem LR register selector tests (part2)" }
1327 send_gdb "x/12i fmemLRbug_tests_3\n"
1328 gdb_expect {
1329 -re "
1330 .*fstwx fr6R,r25\\(sr0,r26\\).*
1331 .*fstwx fr6,r25\\(sr0,r26\\).*
1332 .*fstwx fr6,r25\\(sr0,r26\\).*
1333 .*fstdx fr6,r25\\(sr0,r26\\).*
1334 .*fstdx fr6,r25\\(sr0,r26\\).*
1335 .*fstdx fr6,r25\\(sr0,r26\\).*
1336 .*fldwx r25\\(sr0,r26\\),fr6R.*
1337 .*fldwx r25\\(sr0,r26\\),fr6.*
1338 .*fldwx r25\\(sr0,r26\\),fr6.*
1339 .*flddx r25\\(sr0,r26\\),fr6.*
1340 .*flddx r25\\(sr0,r26\\),fr6.*
1341 .*flddx r25\\(sr0,r26\\),fr6.*
1342 .*$gdb_prompt $" { pass "fmem LR register selector tests (part3)" }
1343 -re "$gdb_prompt $" { fail "fmem LR register selector tests (part3)" }
1344 timeout { fail "(timeout) fmem LR register selector tests (part3)" }
1347 send_gdb "x/12i fmemLRbug_tests_4\n"
1348 gdb_expect {
1349 -re "
1350 .*fstwx fr6R,r25\\(sr0,r26\\).*
1351 .*fstwx fr6,r25\\(sr0,r26\\).*
1352 .*fstwx fr6,r25\\(sr0,r26\\).*
1353 .*fstdx fr6,r25\\(sr0,r26\\).*
1354 .*fstdx fr6,r25\\(sr0,r26\\).*
1355 .*fstdx fr6,r25\\(sr0,r26\\).*
1356 .*fldwx r25\\(sr0,r26\\),fr6R.*
1357 .*fldwx r25\\(sr0,r26\\),fr6.*
1358 .*fldwx r25\\(sr0,r26\\),fr6.*
1359 .*flddx r25\\(sr0,r26\\),fr6.*
1360 .*flddx r25\\(sr0,r26\\),fr6.*
1361 .*flddx r25\\(sr0,r26\\),fr6.*
1362 .*$gdb_prompt $" { pass "fmem LR register selector tests (part4)" }
1363 -re "$gdb_prompt $" { fail "fmem LR register selector tests (part4)" }
1364 timeout { fail "(timeout) fmem LR register selector tests (part4)" }
1368 clean_restart $binfile
1370 all_integer_memory_tests
1371 all_immediate_tests
1372 all_branch_tests
1373 all_integer_computational_tests
1374 all_system_control_tests
1375 all_fpu_memory_tests
1376 all_fpu_computational_tests
1377 all_fpu_comparison_tests
1378 all_special_tests
1379 all_sfu_tests
1380 all_copr_tests
1381 all_copr_mem_tests
1383 # Regression test for a bug Tege found.
1384 fmemLRbug_tests