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