Commit | Line | Data |
---|---|---|
47882638 JK |
1 | # Copyright (C) 1992 Free Software Foundation, Inc. |
2 | ||
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
16 | ||
17 | # Please email any bugs, comments, and/or additions to this file to: | |
18 | # bug-gdb@prep.ai.mit.edu | |
19 | ||
20 | # This file was written by Jeff Law. (law@cs.utah.edu) | |
21 | ||
22 | if $tracelevel then { | |
23 | strace $tracelevel | |
24 | } | |
25 | ||
26 | set prms_id 0 | |
27 | set bug_id 0 | |
28 | ||
29 | set binfile "hppa" | |
30 | set srcfile $binfile.s | |
31 | ||
32 | if ![file exists $objdir/$subdir/$binfile] then { | |
33 | error "$objdir/$subdir/$binfile does not exist." | |
34 | continue | |
35 | } | |
36 | ||
37 | proc all_integer_memory_tests { } { | |
38 | global prompt | |
39 | global hex | |
40 | global decimal | |
41 | ||
42 | send "x/8i integer_memory_tests\n" | |
43 | expect { | |
44 | -re ".* | |
45 | .*ldw 0\(sr0,r4\),arg0\r\n\ | |
46 | .*ldh 0\(sr0,r4\),arg0\r\n\ | |
47 | .*ldb 0\(sr0,r4\),arg0\r\n\ | |
48 | .*stw arg0,0\(sr0,r4\)\r\n\ | |
49 | .*sth arg0,0\(sr0,r4\)\r\n\ | |
50 | .*stb arg0,0\(sr0,r4\)\r\n\ | |
51 | .*ldwm 0\(sr0,r4\),arg0\r\n\ | |
52 | .*stwm arg0,0\(sr0,r4\)\r\n\ | |
53 | .*$prompt $" { pass "integer_memory_tests" } | |
54 | -re "$prompt $" { fail "integer_memory_tests" } | |
55 | timeout { fail "(timeout) integer memory_tests" } | |
56 | } | |
57 | ||
58 | send "x/20i integer_indexing_load\n" | |
59 | expect { | |
60 | -re ".* | |
61 | .*ldwx r5\(sr0,r4\),arg0\r\n\ | |
62 | .*ldwx,s r5\(sr0,r4\),arg0\r\n\ | |
63 | .*ldwx,m r5\(sr0,r4\),arg0\r\n\ | |
64 | .*ldwx,sm r5\(sr0,r4\),arg0\r\n\ | |
65 | .*ldhx r5\(sr0,r4\),arg0\r\n\ | |
66 | .*ldhx,s r5\(sr0,r4\),arg0\r\n\ | |
67 | .*ldhx,m r5\(sr0,r4\),arg0\r\n\ | |
68 | .*ldhx,sm r5\(sr0,r4\),arg0\r\n\ | |
69 | .*ldbx r5\(sr0,r4\),arg0\r\n\ | |
70 | .*ldbx,s r5\(sr0,r4\),arg0\r\n\ | |
71 | .*ldbx,m r5\(sr0,r4\),arg0\r\n\ | |
72 | .*ldbx,sm r5\(sr0,r4\),arg0\r\n\ | |
73 | .*ldwax r5\(r4\),arg0\r\n\ | |
74 | .*ldwax,s r5\(r4\),arg0\r\n\ | |
75 | .*ldwax,m r5\(r4\),arg0\r\n\ | |
76 | .*ldwax,sm r5\(r4\),arg0\r\n\ | |
77 | .*ldcwx r5\(sr0,r4\),arg0\r\n\ | |
78 | .*ldcwx,s r5\(sr0,r4\),arg0\r\n\ | |
79 | .*ldcwx,m r5\(sr0,r4\),arg0\r\n\ | |
80 | .*ldcwx,sm r5\(sr0,r4\),arg0\r\n\ | |
81 | .*$prompt $" { pass "integer_indexing_load" } | |
82 | -re "$prompt $" { fail "integer_indexing_load" } | |
83 | timeout { fail "(timeout) integer_indexing" } | |
84 | } | |
85 | ||
86 | send "x/15i integer_load_short_memory\n" | |
87 | expect { | |
88 | -re ".* | |
89 | .*ldws 0\(sr0,r4\),arg0\r\n\ | |
90 | .*ldws,mb 0\(sr0,r4\),arg0\r\n\ | |
91 | .*ldws,ma 0\(sr0,r4\),arg0\r\n\ | |
92 | .*ldhs 0\(sr0,r4\),arg0\r\n\ | |
93 | .*ldhs,mb 0\(sr0,r4\),arg0\r\n\ | |
94 | .*ldhs,ma 0\(sr0,r4\),arg0\r\n\ | |
95 | .*ldbs 0\(sr0,r4\),arg0\r\n\ | |
96 | .*ldbs,mb 0\(sr0,r4\),arg0\r\n\ | |
97 | .*ldbs,ma 0\(sr0,r4\),arg0\r\n\ | |
98 | .*ldwas 0\(r4\),arg0\r\n\ | |
99 | .*ldwas,mb 0\(r4\),arg0\r\n\ | |
100 | .*ldwas,ma 0\(r4\),arg0\r\n\ | |
101 | .*ldcws 0\(sr0,r4\),arg0\r\n\ | |
102 | .*ldcws,mb 0\(sr0,r4\),arg0\r\n\ | |
103 | .*ldcws,ma 0\(sr0,r4\),arg0\r\n\ | |
104 | .*$prompt $" { pass "integer_load_short_memory" } | |
105 | -re "$prompt $" { fail "integer_load_short_memory" } | |
106 | timeout { fail "(timeout) integer_load_short_memory " } | |
107 | } | |
108 | ||
109 | ||
110 | send "x/17i integer_store_short_memory\n" | |
111 | expect { | |
112 | -re ".* | |
113 | .*stws arg0,0\(sr0,r4\)\r\n\ | |
114 | .*stws,mb arg0,0\(sr0,r4\)\r\n\ | |
115 | .*stws,ma arg0,0\(sr0,r4\)\r\n\ | |
116 | .*sths arg0,0\(sr0,r4\)\r\n\ | |
117 | .*sths,mb arg0,0\(sr0,r4\)\r\n\ | |
118 | .*sths,ma arg0,0\(sr0,r4\)\r\n\ | |
119 | .*stbs arg0,0\(sr0,r4\)\r\n\ | |
120 | .*stbs,mb arg0,0\(sr0,r4\)\r\n\ | |
121 | .*stbs,ma arg0,0\(sr0,r4\)\r\n\ | |
122 | .*stwas arg0,0\(r4\)\r\n\ | |
123 | .*stwas,mb arg0,0\(r4\)\r\n\ | |
124 | .*stwas,ma arg0,0\(r4\)\r\n\ | |
125 | .*stbys arg0,0\(sr0,r4\)\r\n\ | |
126 | .*stbys arg0,0\(sr0,r4\)\r\n\ | |
127 | .*stbys,e arg0,0\(sr0,r4\)\r\n\ | |
128 | .*stbys,b,m arg0,0\(sr0,r4\)\r\n\ | |
129 | .*stbys,e,m arg0,0\(sr0,r4\)\r\n\ | |
130 | .*$prompt $" { pass "integer_store_short_memory" } | |
131 | -re "$prompt $" { fail "integer_store_short_memory" } | |
132 | timeout { fail "(timeout) integer_short_memory " } | |
133 | } | |
134 | } | |
135 | ||
136 | proc all_immediate_tests { } { | |
137 | global prompt | |
138 | global hex | |
139 | global decimal | |
140 | ||
141 | send "x/3i immediate_tests\n" | |
142 | expect { | |
143 | -re ".* | |
144 | .*ldo 5\(arg0\),arg0\r\n\ | |
145 | .*ldil -21524800,arg0\r\n\ | |
146 | .*addil -21524800,r5\r\n\ | |
147 | .*$prompt $" { pass "immedate_tests" } | |
148 | -re "$prompt $" { fail "immedate_tests" } | |
149 | timeout { fail "(timeout) immedate_tests " } | |
150 | } | |
151 | } | |
152 | ||
153 | proc all_branch_tests { } { | |
154 | global prompt | |
155 | global hex | |
156 | global decimal | |
157 | ||
158 | send "x/16i branch_tests\n" | |
159 | expect { | |
160 | -re ".* | |
161 | .*bl.*<main>,rp\r\n\ | |
162 | .*bl,n.*<main>,rp\r\n\ | |
163 | .*b.*<main>\r\n\ | |
164 | .*b,n.*<main>\r\n\ | |
165 | .*gate.*<main>,rp\r\n\ | |
166 | .*gate,n.*<main>,rp\r\n\ | |
167 | .*blr r4,rp\r\n\ | |
168 | .*blr,n r4,rp\r\n\ | |
169 | .*blr r4,r0\r\n\ | |
170 | .*blr,n r4,r0\r\n\ | |
171 | .*bv r0\(rp\)\r\n\ | |
172 | .*bv,n r0\(rp\)\r\n\ | |
173 | .*be 1234\(sr1,rp\)\r\n\ | |
174 | .*be,n 1234\(sr1,rp\)\r\n\ | |
175 | .*ble 1234\(sr1,rp\)\r\n\ | |
176 | .*ble,n 1234\(sr1,rp\)\r\n\ | |
177 | .*$prompt $" { pass "branch_tests" } | |
178 | -re "$prompt $" { fail "branch_tests" } | |
179 | timeout { fail "(timeout) branch_tests " } | |
180 | } | |
181 | ||
182 | ||
183 | send "x/8i movb_tests\n" | |
184 | expect { | |
185 | -re ".* | |
186 | .*movb r4,arg0,.* <movb_tests>\r\n\ | |
187 | .*movb,= r4,arg0,.* <movb_tests>\r\n\ | |
188 | .*movb,< r4,arg0,.* <movb_tests>\r\n\ | |
189 | .*movb,od r4,arg0,.* <movb_tests>\r\n\ | |
190 | .*movb,tr r4,arg0,.* <movb_tests>\r\n\ | |
191 | .*movb,<> r4,arg0,.* <movb_tests>\r\n\ | |
192 | .*movb,>= r4,arg0,.* <movb_tests>\r\n\ | |
193 | .*movb,ev r4,arg0,.* <movb_tests>\r\n\ | |
194 | .*$prompt $" { pass "movb_tests" } | |
195 | -re "$prompt $" { fail "movb_tests" } | |
196 | timeout { fail "(timeout) movb_tests " } | |
197 | } | |
198 | ||
199 | send "x/8i movb_nullified_tests\n" | |
200 | expect { | |
201 | -re ".* | |
202 | .*movb,n.*r4,arg0,.* <movb_tests>\r\n\ | |
203 | .*movb,=,n.*r4,arg0,.* <movb_tests>\r\n\ | |
204 | .*movb,<,n.*r4,arg0,.* <movb_tests>\r\n\ | |
205 | .*movb,od,n.*r4,arg0,.* <movb_tests>\r\n\ | |
206 | .*movb,tr,n.*r4,arg0,.* <movb_tests>\r\n\ | |
207 | .*movb,<>,n.*r4,arg0,.* <movb_tests>\r\n\ | |
208 | .*movb,>=,n.*r4,arg0,.* <movb_tests>\r\n\ | |
209 | .*movb,ev,n.*r4,arg0,.* <movb_tests>\r\n\ | |
210 | .*$prompt $" { pass "movb_nullified_tests" } | |
211 | -re "$prompt $" { fail "movb_nullified_tests" } | |
212 | timeout { fail "(timeout) movb_nullified_tests " } | |
213 | } | |
214 | ||
215 | send "x/8i movib_tests\n" | |
216 | expect { | |
217 | -re ".* | |
218 | .*movib 5,arg0,.* <movib_tests>\r\n\ | |
219 | .*movib,= 5,arg0,.* <movib_tests>\r\n\ | |
220 | .*movib,< 5,arg0,.* <movib_tests>\r\n\ | |
221 | .*movib,od 5,arg0,.* <movib_tests>\r\n\ | |
222 | .*movib,tr 5,arg0,.* <movib_tests>\r\n\ | |
223 | .*movib,<> 5,arg0,.* <movib_tests>\r\n\ | |
224 | .*movib,>= 5,arg0,.* <movib_tests>\r\n\ | |
225 | .*movib,ev 5,arg0,.* <movib_tests>\r\n\ | |
226 | .*$prompt $" { pass "movib_tests" } | |
227 | -re "$prompt $" { fail "movib_tests" } | |
228 | timeout { fail "(timeout) movib_tests " } | |
229 | } | |
230 | ||
231 | send "x/8i movib_nullified_tests\n" | |
232 | expect { | |
233 | -re ".* | |
234 | .*movib,n.*5,arg0,.* <movib_tests>\r\n\ | |
235 | .*movib,=,n.*5,arg0,.* <movib_tests>\r\n\ | |
236 | .*movib,<,n.*5,arg0,.* <movib_tests>\r\n\ | |
237 | .*movib,od,n.*5,arg0,.* <movib_tests>\r\n\ | |
238 | .*movib,tr,n.*5,arg0,.* <movib_tests>\r\n\ | |
239 | .*movib,<>,n.*5,arg0,.* <movib_tests>\r\n\ | |
240 | .*movib,>=,n.*5,arg0,.* <movib_tests>\r\n\ | |
241 | .*movib,ev,n.*5,arg0,.* <movib_tests>\r\n\ | |
242 | .*$prompt $" { pass "movib_nullified_tests" } | |
243 | -re "$prompt $" { fail "movib_nullified_tests" } | |
244 | timeout { fail "(timeout) movib_nullified_tests " } | |
245 | } | |
246 | ||
247 | # Fails because of true-false usage and polarity of conditions. | |
248 | setup_xfail "hppa*-*-*" | |
249 | send "x/16i comb_tests\n" | |
250 | expect { | |
251 | -re ".* | |
252 | .*combt r0,arg0,.* <comb_tests>\r\n\ | |
253 | .*combt,= r0,arg0,.* <comb_tests>\r\n\ | |
254 | .*combt,< r0,arg0,.* <comb_tests>\r\n\ | |
255 | .*combt,<= r0,arg0,.* <comb_tests>\r\n\ | |
256 | .*combt,<< r0,arg0,.* <comb_tests>\r\n\ | |
257 | .*combt,<<= r0,arg0,.* <comb_tests>\r\n\ | |
258 | .*combt,sv r0,arg0,.* <comb_tests>\r\n\ | |
259 | .*combt,od r0,arg0,.* <comb_tests>\r\n\ | |
260 | .*combf r0,arg0,.* <comb_tests>\r\n\ | |
261 | .*combf,= r0,arg0,.* <comb_tests>\r\n\ | |
262 | .*combf,< r0,arg0,.* <comb_tests>\r\n\ | |
263 | .*combf,<= r0,arg0,.* <comb_tests>\r\n\ | |
264 | .*combf,<< r0,arg0,.* <comb_tests>\r\n\ | |
265 | .*combf,<<= r0,arg0,.* <comb_tests>\r\n\ | |
266 | .*combf,sv r0,arg0,.* <comb_tests>\r\n\ | |
267 | .*combf,od r0,arg0,.* <comb_tests>\r\n\ | |
268 | .*$prompt $" { pass "comb_tests" } | |
269 | -re "$prompt $" { fail "comb_tests" } | |
270 | timeout { fail "(timeout) comb_tests " } | |
271 | } | |
272 | ||
273 | # Fails because of true-false usage and polarity of conditions. | |
274 | setup_xfail "hppa*-*-*" | |
275 | send "x/16i comb_nullified_tests\n" | |
276 | expect { | |
277 | -re ".* | |
278 | .*combt,n r0,arg0,.* <comb_tests>\r\n\ | |
279 | .*combt,=,n r0,arg0,.* <comb_tests>\r\n\ | |
280 | .*combt,<,n r0,arg0,.* <comb_tests>\r\n\ | |
281 | .*combt,<=,n r0,arg0,.* <comb_tests>\r\n\ | |
282 | .*combt,<<,n r0,arg0,.* <comb_tests>\r\n\ | |
283 | .*combt,<<=,n r0,arg0,.* <comb_tests>\r\n\ | |
284 | .*combt,sv,n r0,arg0,.* <comb_tests>\r\n\ | |
285 | .*combt,od,n r0,arg0,.* <comb_tests>\r\n\ | |
286 | .*combf,n r0,arg0,.* <comb_tests>\r\n\ | |
287 | .*combf,=,n r0,arg0,.* <comb_tests>\r\n\ | |
288 | .*combf,<,n r0,arg0,.* <comb_tests>\r\n\ | |
289 | .*combf,<=,n r0,arg0,.* <comb_tests>\r\n\ | |
290 | .*combf,<<,n r0,arg0,.* <comb_tests>\r\n\ | |
291 | .*combf,<<=,n r0,arg0,.* <comb_tests>\r\n\ | |
292 | .*combf,sv,n r0,arg0,.* <comb_tests>\r\n\ | |
293 | .*combf,od,n r0,arg0,.* <comb_tests>\r\n\ | |
294 | .*$prompt $" { pass "comb_nullified_tests" } | |
295 | -re "$prompt $" { fail "comb_nullified_tests" } | |
296 | timeout { fail "(timeout) comb_nullified_tests " } | |
297 | } | |
298 | ||
299 | # Fails because of true-false usage and polarity of conditions. | |
300 | setup_xfail "hppa*-*-*" | |
301 | send "x/16i comib_tests\n" | |
302 | expect { | |
303 | -re ".* | |
304 | .*comib 0,arg0,.* <comib_tests>\r\n\ | |
305 | .*comib,= 0,arg0,.* <comib_tests>\r\n\ | |
306 | .*comib,< 0,arg0,.* <comib_tests>\r\n\ | |
307 | .*comib,<= 0,arg0,.* <comib_tests>\r\n\ | |
308 | .*comib,<< 0,arg0,.* <comib_tests>\r\n\ | |
309 | .*comib,<<= 0,arg0,.* <comib_tests>\r\n\ | |
310 | .*comibt,sv 0,arg0,.* <comib_tests>\r\n\ | |
311 | .*comibt,od 0,arg0,.* <comib_tests>\r\n\ | |
312 | .*comibt 0,arg0,.* <comib_tests>\r\n\ | |
313 | .*comibt,= 0,arg0,.* <comib_tests>\r\n\ | |
314 | .*comibt,< 0,arg0,.* <comib_tests>\r\n\ | |
315 | .*comibt,<= 0,arg0,.* <comib_tests>\r\n\ | |
316 | .*comibt,<< 0,arg0,.* <comib_tests>\r\n\ | |
317 | .*comibt,<<= 0,arg0,.* <comib_tests>\r\n\ | |
318 | .*comibf,sv 0,arg0,.* <comib_tests>\r\n\ | |
319 | .*comibf,od 0,arg0,.* <comib_tests>\r\n\ | |
320 | .*$prompt $" { pass "comib_tests" } | |
321 | -re "$prompt $" { fail "comib_tests" } | |
322 | timeout { fail "(timeout) comib_tests " } | |
323 | } | |
324 | ||
325 | # Fails because of true-false usage and polarity of conditions. | |
326 | setup_xfail "hppa*-*-*" | |
327 | send "x/16i comib_nullified_tests\n" | |
328 | expect { | |
329 | -re ".* | |
330 | .*comibt,n 0,arg0,.* <comib_tests>\r\n\ | |
331 | .*comibt,=,n 0,arg0,.* <comib_tests>\r\n\ | |
332 | .*comibt,<,n 0,arg0,.* <comib_tests>\r\n\ | |
333 | .*comibt,<=,n 0,arg0,.* <comib_tests>\r\n\ | |
334 | .*comibt,<<,n 0,arg0,.* <comib_tests>\r\n\ | |
335 | .*comibt,<<=,n 0,arg0,.* <comib_tests>\r\n\ | |
336 | .*comibt,sv,n 0,arg0,.* <comib_tests>\r\n\ | |
337 | .*comibt,od,n 0,arg0,.* <comib_tests>\r\n\ | |
338 | .*comibf,n 0,arg0,.* <comib_tests>\r\n\ | |
339 | .*comibf,=,n 0,arg0,.* <comib_tests>\r\n\ | |
340 | .*comibf,<,n 0,arg0,.* <comib_tests>\r\n\ | |
341 | .*comibf,<=,n 0,arg0,.* <comib_tests>\r\n\ | |
342 | .*comibf,<<,n 0,arg0,.* <comib_tests>\r\n\ | |
343 | .*comibf,<<=,n 0,arg0,.* <comib_tests>\r\n\ | |
344 | .*comibf,sv,n 0,arg0,.* <comib_tests>\r\n\ | |
345 | .*comibf,od,n 0,arg0,.* <comib_tests>\r\n\ | |
346 | .*$prompt $" { pass "comib_nullified_tests" } | |
347 | -re "$prompt $" { fail "comib_nullified_tests" } | |
348 | timeout { fail "(timeout) comib_nullified_tests " } | |
349 | } | |
350 | ||
351 | # Fails because of true-false usage and polarity of conditions. | |
352 | setup_xfail "hppa*-*-*" | |
353 | send "x/16i addb_tests\n" | |
354 | expect { | |
355 | -re ".* | |
356 | .*addbt r1,arg0,.* <addb_tests>\r\n\ | |
357 | .*addbt,= r1,arg0,.* <addb_tests>\r\n\ | |
358 | .*addbt,< r1,arg0,.* <addb_tests>\r\n\ | |
359 | .*addbt,<= r1,arg0,.* <addb_tests>\r\n\ | |
360 | .*addbt,nuv r1,arg0,.* <addb_tests>\r\n\ | |
361 | .*addbt,znv r1,arg0,.* <addb_tests>\r\n\ | |
362 | .*addbt,sv r1,arg0,.* <addb_tests>\r\n\ | |
363 | .*addbt,od r1,arg0,.* <addb_tests>\r\n\ | |
364 | .*addbf r1,arg0,.* <addb_tests>\r\n\ | |
365 | .*addbf,= r1,arg0,.* <addb_tests>\r\n\ | |
366 | .*addbf,< r1,arg0,.* <addb_tests>\r\n\ | |
367 | .*addbf,<= r1,arg0,.* <addb_tests>\r\n\ | |
368 | .*addbf,nuv r1,arg0,.* <addb_tests>\r\n\ | |
369 | .*addbf,znv r1,arg0,.* <addb_tests>\r\n\ | |
370 | .*addbf,sv r1,arg0,.* <addb_tests>\r\n\ | |
371 | .*addbf,od r1,arg0,.* <addb_tests>\r\n\ | |
372 | .*$prompt $" { pass "addb_tests" } | |
373 | -re "$prompt $" { fail "addb_tests" } | |
374 | timeout { fail "(timeout) addb_tests " } | |
375 | } | |
376 | ||
377 | # Fails because of true-false usage and polarity of conditions. | |
378 | setup_xfail "hppa*-*-*" | |
379 | send "x/16i addb_nullified_tests\n" | |
380 | expect { | |
381 | -re ".* | |
382 | .*addbt,n r1,arg0,.* <addb_tests>\r\n\ | |
383 | .*addbt,=,n r1,arg0,.* <addb_tests>\r\n\ | |
384 | .*addbt,<,n r1,arg0,.* <addb_tests>\r\n\ | |
385 | .*addbt,<=,n r1,arg0,.* <addb_tests>\r\n\ | |
386 | .*addbt,nuv,n r1,arg0,.* <addb_tests>\r\n\ | |
387 | .*addbt,znv,n r1,arg0,.* <addb_tests>\r\n\ | |
388 | .*addbt,sv,n r1,arg0,.* <addb_tests>\r\n\ | |
389 | .*addbt,od,n r1,arg0,.* <addb_tests>\r\n\ | |
390 | .*addbf,n r1,arg0,.* <addb_tests>\r\n\ | |
391 | .*addbf,=,n r1,arg0,.* <addb_tests>\r\n\ | |
392 | .*addbf,<,n r1,arg0,.* <addb_tests>\r\n\ | |
393 | .*addbf,<=,n r1,arg0,.* <addb_tests>\r\n\ | |
394 | .*addbf,nuv,n r1,arg0,.* <addb_tests>\r\n\ | |
395 | .*addbf,znv,n r1,arg0,.* <addb_tests>\r\n\ | |
396 | .*addbf,sv,n r1,arg0,.* <addb_tests>\r\n\ | |
397 | .*addbf,od,n r1,arg0,.* <addb_tests>\r\n\ | |
398 | .*$prompt $" { pass "addb_nullified_tests" } | |
399 | -re "$prompt $" { fail "addb_nullified_tests" } | |
400 | timeout { fail "(timeout) addb_nullified_tests " } | |
401 | } | |
402 | ||
403 | # Fails because of true-false usage and polarity of conditions. | |
404 | setup_xfail "hppa*-*-*" | |
405 | send "x/16i addib_tests\n" | |
406 | expect { | |
407 | -re ".* | |
408 | .*addibt -1,arg0,.* <addib_tests>\r\n\ | |
409 | .*addibt,= -1,arg0,.* <addib_tests>\r\n\ | |
410 | .*addibt,< -1,arg0,.* <addib_tests>\r\n\ | |
411 | .*addibt,<= -1,arg0,.* <addib_tests>\r\n\ | |
412 | .*addibt,nuv -1,arg0,.* <addib_tests>\r\n\ | |
413 | .*addibt,znv -1,arg0,.* <addib_tests>\r\n\ | |
414 | .*addibt,sv -1,arg0,.* <addib_tests>\r\n\ | |
415 | .*addibt,od -1,arg0,.* <addib_tests>\r\n\ | |
416 | .*addibf -1,arg0,.* <addib_tests>\r\n\ | |
417 | .*addibf,= -1,arg0,.* <addib_tests>\r\n\ | |
418 | .*addibf,< -1,arg0,.* <addib_tests>\r\n\ | |
419 | .*addibf,<= -1,arg0,.* <addib_tests>\r\n\ | |
420 | .*addibf,nuv -1,arg0,.* <addib_tests>\r\n\ | |
421 | .*addibf,znv -1,arg0,.* <addib_tests>\r\n\ | |
422 | .*addibf,sv -1,arg0,.* <addib_tests>\r\n\ | |
423 | .*addbf,od -1,arg0,.* <addib_tests>\r\n\ | |
424 | .*$prompt $" { pass "addib_tests" } | |
425 | -re "$prompt $" { fail "addib_tests" } | |
426 | timeout { fail "(timeout) addib_tests " } | |
427 | } | |
428 | ||
429 | # Fails because of true-false usage and polarity of conditions. | |
430 | setup_xfail "hppa*-*-*" | |
431 | send "x/16i addib_nullified_tests\n" | |
432 | expect { | |
433 | -re ".* | |
434 | .*addibt,n -1,arg0,.* <addib_tests>\r\n\ | |
435 | .*addibt,=,n -1,arg0,.* <addib_tests>\r\n\ | |
436 | .*addibt,<,n -1,arg0,.* <addib_tests>\r\n\ | |
437 | .*addibt,<=,n -1,arg0,.* <addib_tests>\r\n\ | |
438 | .*addibt,nuv,n -1,arg0,.* <addib_tests>\r\n\ | |
439 | .*addibt,znv,n -1,arg0,.* <addib_tests>\r\n\ | |
440 | .*addibt,sv,n -1,arg0,.* <addib_tests>\r\n\ | |
441 | .*addibt,od,n -1,arg0,.* <addib_tests>\r\n\ | |
442 | .*addibf,n -1,arg0,.* <addib_tests>\r\n\ | |
443 | .*addibf,=,n -1,arg0,.* <addib_tests>\r\n\ | |
444 | .*addibf,<,n -1,arg0,.* <addib_tests>\r\n\ | |
445 | .*addibf,<=,n -1,arg0,.* <addib_tests>\r\n\ | |
446 | .*addibf,nuv,n -1,arg0,.* <addib_tests>\r\n\ | |
447 | .*addibf,znv,n -1,arg0,.* <addib_tests>\r\n\ | |
448 | .*addibf,sv,n -1,arg0,.* <addib_tests>\r\n\ | |
449 | .*addibf,od,n -1,arg0,.* <addib_tests>\r\n\ | |
450 | .*$prompt $" { pass "addb_nullified_tests" } | |
451 | -re "$prompt $" { fail "addb_nullified_tests" } | |
452 | timeout { fail "(timeout) addb_nullified_tests " } | |
453 | } | |
454 | ||
455 | send "x/8i bb_tests\n" | |
456 | expect { | |
457 | -re ".* | |
458 | .*bvb,< r4,.* <bb_tests>\r\n\ | |
459 | .*bvb,>= r4,.* <bb_tests>\r\n\ | |
460 | .*bvb,<,n r4,.* <bb_tests>\r\n\ | |
461 | .*bvb,>=,n r4,.* <bb_tests>\r\n\ | |
462 | .*bb,< r4,5,.* <bb_tests>\r\n\ | |
463 | .*bb,>= r4,5,.* <bb_tests>\r\n\ | |
464 | .*bb,<,n r4,5,.* <bb_tests>\r\n\ | |
465 | .*bb,>=,n r4,5,.* <bb_tests>\r\n\ | |
466 | .*$prompt $" { pass "bb_tests" } | |
467 | -re "$prompt $" { fail "bb_tests" } | |
468 | timeout { fail "(timeout) bb_tests " } | |
469 | } | |
470 | } | |
471 | ||
472 | proc all_integer_computational_tests { } { | |
473 | global prompt | |
474 | global hex | |
475 | global decimal | |
476 | ||
477 | set add_insns [list {add} {addl} {addo} {addc} {addco} \ | |
478 | {sh1add} {sh1addl} {sh1addo} \ | |
479 | {sh2add} {sh2addl} {sh2addo} \ | |
480 | {sh3add} {sh3addl} {sh3addo} ] | |
481 | ||
482 | foreach i $add_insns { | |
483 | send "x/16i $i"; send "_tests\n" | |
484 | expect { | |
485 | -re ".* | |
486 | .*$i r4,r5,r6\r\n\ | |
487 | .*$i,= r4,r5,r6\r\n\ | |
488 | .*$i,< r4,r5,r6\r\n\ | |
489 | .*$i,<= r4,r5,r6\r\n\ | |
490 | .*$i,nuv r4,r5,r6\r\n\ | |
491 | .*$i,znv r4,r5,r6\r\n\ | |
492 | .*$i,sv r4,r5,r6\r\n\ | |
493 | .*$i,od r4,r5,r6\r\n\ | |
494 | .*$i,tr r4,r5,r6\r\n\ | |
495 | .*$i,<> r4,r5,r6\r\n\ | |
496 | .*$i,>= r4,r5,r6\r\n\ | |
497 | .*$i,> r4,r5,r6\r\n\ | |
498 | .*$i,uv r4,r5,r6\r\n\ | |
499 | .*$i,vnz r4,r5,r6\r\n\ | |
500 | .*$i,nsv r4,r5,r6\r\n\ | |
501 | .*$i,ev r4,r5,r6\r\n\ | |
502 | .*$prompt $" { pass "$i tests" } | |
503 | -re "$prompt $" { fail "$i tests" } | |
504 | timeout { fail "(timeout) $i tests" } | |
505 | } | |
506 | } | |
507 | ||
508 | set sub_insns [list {sub} {subo} {subb} {subbo} {subt} {subto} \ | |
509 | {ds} {comclr} ] | |
510 | ||
511 | foreach i $sub_insns { | |
512 | send "x/16i $i"; send "_tests\n" | |
513 | expect { | |
514 | -re ".* | |
515 | .*$i r4,r5,r6\r\n\ | |
516 | .*$i,= r4,r5,r6\r\n\ | |
517 | .*$i,< r4,r5,r6\r\n\ | |
518 | .*$i,<= r4,r5,r6\r\n\ | |
519 | .*$i,<< r4,r5,r6\r\n\ | |
520 | .*$i,<<= r4,r5,r6\r\n\ | |
521 | .*$i,sv r4,r5,r6\r\n\ | |
522 | .*$i,od r4,r5,r6\r\n\ | |
523 | .*$i,tr r4,r5,r6\r\n\ | |
524 | .*$i,<> r4,r5,r6\r\n\ | |
525 | .*$i,>= r4,r5,r6\r\n\ | |
526 | .*$i,> r4,r5,r6\r\n\ | |
527 | .*$i,>>= r4,r5,r6\r\n\ | |
528 | .*$i,>> r4,r5,r6\r\n\ | |
529 | .*$i,nsv r4,r5,r6\r\n\ | |
530 | .*$i,ev r4,r5,r6\r\n\ | |
531 | .*$prompt $" { pass "$i tests" } | |
532 | -re "$prompt $" { fail "$i tests" } | |
533 | timeout { fail "(timeout) $i tests" } | |
534 | } | |
535 | } | |
536 | ||
537 | set logical_insns [list {or} {xor} {and} {andcm} ] | |
538 | ||
539 | foreach i $logical_insns { | |
540 | send "x/10i $i"; send "_tests\n" | |
541 | expect { | |
542 | -re ".* | |
543 | .*$i r4,r5,r6\r\n\ | |
544 | .*$i,= r4,r5,r6\r\n\ | |
545 | .*$i,< r4,r5,r6\r\n\ | |
546 | .*$i,<= r4,r5,r6\r\n\ | |
547 | .*$i,od r4,r5,r6\r\n\ | |
548 | .*$i,tr r4,r5,r6\r\n\ | |
549 | .*$i,<> r4,r5,r6\r\n\ | |
550 | .*$i,>= r4,r5,r6\r\n\ | |
551 | .*$i,> r4,r5,r6\r\n\ | |
552 | .*$i,ev r4,r5,r6\r\n\ | |
553 | .*$prompt $" { pass "$i tests" } | |
554 | -re "$prompt $" { fail "$i tests" } | |
555 | timeout { fail "(timeout) $i tests" } | |
556 | } | |
557 | } | |
558 | ||
559 | set unit_insns1 [list {uxor} {uaddcm} {uaddcmt} ] | |
560 | ||
561 | foreach i $unit_insns1 { | |
562 | send "x/12i $i"; send "_tests\n" | |
563 | expect { | |
564 | -re ".* | |
565 | .*$i r4,r5,r6\r\n\ | |
566 | .*$i,sbz r4,r5,r6\r\n\ | |
567 | .*$i,shz r4,r5,r6\r\n\ | |
568 | .*$i,sdc r4,r5,r6\r\n\ | |
569 | .*$i,sbc r4,r5,r6\r\n\ | |
570 | .*$i,shc r4,r5,r6\r\n\ | |
571 | .*$i,tr r4,r5,r6\r\n\ | |
572 | .*$i,nbz r4,r5,r6\r\n\ | |
573 | .*$i,nhz r4,r5,r6\r\n\ | |
574 | .*$i,ndc r4,r5,r6\r\n\ | |
575 | .*$i,nbc r4,r5,r6\r\n\ | |
576 | .*$i,nhc r4,r5,r6\r\n\ | |
577 | .*$prompt $" { pass "$i tests" } | |
578 | -re "$prompt $" { fail "$i tests" } | |
579 | timeout { fail "(timeout) $i tests" } | |
580 | } | |
581 | } | |
582 | ||
583 | set unit_insns2 [list {dcor} {idcor} ] | |
584 | ||
585 | foreach i $unit_insns2 { | |
586 | send "x/12i $i"; send "_tests\n" | |
587 | expect { | |
588 | -re ".* | |
589 | .*$i r4,r5\r\n\ | |
590 | .*$i,sbz r4,r5\r\n\ | |
591 | .*$i,shz r4,r5\r\n\ | |
592 | .*$i,sdc r4,r5\r\n\ | |
593 | .*$i,sbc r4,r5\r\n\ | |
594 | .*$i,shc r4,r5\r\n\ | |
595 | .*$i,tr r4,r5\r\n\ | |
596 | .*$i,nbz r4,r5\r\n\ | |
597 | .*$i,nhz r4,r5\r\n\ | |
598 | .*$i,ndc r4,r5\r\n\ | |
599 | .*$i,nbc r4,r5\r\n\ | |
600 | .*$i,nhc r4,r5\r\n\ | |
601 | .*$prompt $" { pass "$i tests" } | |
602 | -re "$prompt $" { fail "$i tests" } | |
603 | timeout { fail "(timeout) $i tests" } | |
604 | } | |
605 | } | |
606 | ||
607 | set addi_insns [list {addi} {addio} {addit} {addito} ] | |
608 | ||
609 | foreach i $addi_insns { | |
610 | send "x/16i $i"; send "_tests\n" | |
611 | expect { | |
612 | -re ".* | |
613 | .*$i 7b,r5,r6\r\n\ | |
614 | .*$i,= 7b,r5,r6\r\n\ | |
615 | .*$i,< 7b,r5,r6\r\n\ | |
616 | .*$i,<= 7b,r5,r6\r\n\ | |
617 | .*$i,nuv 7b,r5,r6\r\n\ | |
618 | .*$i,znv 7b,r5,r6\r\n\ | |
619 | .*$i,sv 7b,r5,r6\r\n\ | |
620 | .*$i,od 7b,r5,r6\r\n\ | |
621 | .*$i,tr 7b,r5,r6\r\n\ | |
622 | .*$i,<> 7b,r5,r6\r\n\ | |
623 | .*$i,>= 7b,r5,r6\r\n\ | |
624 | .*$i,> 7b,r5,r6\r\n\ | |
625 | .*$i,uv 7b,r5,r6\r\n\ | |
626 | .*$i,vnz 7b,r5,r6\r\n\ | |
627 | .*$i,nsv 7b,r5,r6\r\n\ | |
628 | .*$i,ev 7b,r5,r6\r\n\ | |
629 | .*$prompt $" { pass "$i tests" } | |
630 | -re "$prompt $" { fail "$i tests" } | |
631 | timeout { fail "(timeout) $i tests" } | |
632 | } | |
633 | } | |
634 | ||
635 | set subi_insns [list {subi} {subio} {comiclr} ] | |
636 | ||
637 | foreach i $subi_insns { | |
638 | send "x/16i $i"; send "_tests\n" | |
639 | expect { | |
640 | -re ".* | |
641 | .*$i 7b,r5,r6\r\n\ | |
642 | .*$i,= 7b,r5,r6\r\n\ | |
643 | .*$i,< 7b,r5,r6\r\n\ | |
644 | .*$i,<= 7b,r5,r6\r\n\ | |
645 | .*$i,<< 7b,r5,r6\r\n\ | |
646 | .*$i,<<= 7b,r5,r6\r\n\ | |
647 | .*$i,sv 7b,r5,r6\r\n\ | |
648 | .*$i,od 7b,r5,r6\r\n\ | |
649 | .*$i,tr 7b,r5,r6\r\n\ | |
650 | .*$i,<> 7b,r5,r6\r\n\ | |
651 | .*$i,>= 7b,r5,r6\r\n\ | |
652 | .*$i,> 7b,r5,r6\r\n\ | |
653 | .*$i,>>= 7b,r5,r6\r\n\ | |
654 | .*$i,>> 7b,r5,r6\r\n\ | |
655 | .*$i,nsv 7b,r5,r6\r\n\ | |
656 | .*$i,ev 7b,r5,r6\r\n\ | |
657 | .*$prompt $" { pass "$i tests" } | |
658 | -re "$prompt $" { fail "$i tests" } | |
659 | timeout { fail "(timeout) $i tests" } | |
660 | } | |
661 | } | |
662 | ||
663 | send "x/8i vshd_tests\n" | |
664 | expect { | |
665 | -re ".* | |
666 | .*vshd r4,r5,r6\r\n\ | |
667 | .*vshd,= r4,r5,r6\r\n\ | |
668 | .*vshd,< r4,r5,r6\r\n\ | |
669 | .*vshd,od r4,r5,r6\r\n\ | |
670 | .*vshd,tr r4,r5,r6\r\n\ | |
671 | .*vshd,<> r4,r5,r6\r\n\ | |
672 | .*vshd,>= r4,r5,r6\r\n\ | |
673 | .*vshd,ev r4,r5,r6\r\n\ | |
674 | .*$prompt $" { pass "vshd tests" } | |
675 | -re "$prompt $" { fail "vshd tests" } | |
676 | timeout { fail "(timeout) "vshd tests" } | |
677 | } | |
678 | ||
679 | send "x/8i shd_tests\n" | |
680 | expect { | |
681 | -re ".* | |
682 | .*shd r4,r5,5,r6\r\n\ | |
683 | .*shd,= r4,r5,5,r6\r\n\ | |
684 | .*shd,< r4,r5,5,r6\r\n\ | |
685 | .*shd,od r4,r5,5,r6\r\n\ | |
686 | .*shd,tr r4,r5,5,r6\r\n\ | |
687 | .*shd,<> r4,r5,5,r6\r\n\ | |
688 | .*shd,>= r4,r5,5,r6\r\n\ | |
689 | .*shd,ev r4,r5,5,r6\r\n\ | |
690 | .*$prompt $" { pass "shd tests" } | |
691 | -re "$prompt $" { fail "shd tests" } | |
692 | timeout { fail "(timeout) "shd tests" } | |
693 | } | |
694 | ||
695 | set extract_insns1 [list {extru} {extrs} {zdep} {dep} ] | |
696 | ||
697 | foreach i $extract_insns1 { | |
698 | send "x/8i $i"; send "_tests\n" | |
699 | expect { | |
700 | -re ".* | |
701 | .*$i r4,5,10,r6\r\n\ | |
702 | .*$i,= r4,5,10,r6\r\n\ | |
703 | .*$i,< r4,5,10,r6\r\n\ | |
704 | .*$i,od r4,5,10,r6\r\n\ | |
705 | .*$i,tr r4,5,10,r6\r\n\ | |
706 | .*$i,<> r4,5,10,r6\r\n\ | |
707 | .*$i,>= r4,5,10,r6\r\n\ | |
708 | .*$i,ev r4,5,10,r6\r\n\ | |
709 | .*$prompt $" { pass "$i tests" } | |
710 | -re "$prompt $" { fail "$i tests" } | |
711 | timeout { fail "(timeout) $i tests" } | |
712 | } | |
713 | } | |
714 | ||
715 | set extract_insns2 [list {vextru} {vextrs} {zvdep} {vdep} ] | |
716 | ||
717 | foreach i $extract_insns2 { | |
718 | send "x/8i $i"; send "_tests\n" | |
719 | expect { | |
720 | -re ".* | |
721 | .*$i r4,5,r6\r\n\ | |
722 | .*$i,= r4,5,r6\r\n\ | |
723 | .*$i,< r4,5,r6\r\n\ | |
724 | .*$i,od r4,5,r6\r\n\ | |
725 | .*$i,tr r4,5,r6\r\n\ | |
726 | .*$i,<> r4,5,r6\r\n\ | |
727 | .*$i,>= r4,5,r6\r\n\ | |
728 | .*$i,ev r4,5,r6\r\n\ | |
729 | .*$prompt $" { pass "$i tests" } | |
730 | -re "$prompt $" { fail "$i tests" } | |
731 | timeout { fail "(timeout) $i tests" } | |
732 | } | |
733 | } | |
734 | ||
735 | set extract_insns3 [list {vdepi} {zvdepi} ] | |
736 | ||
737 | foreach i $extract_insns3 { | |
738 | send "x/8i $i"; send "_tests\n" | |
739 | expect { | |
740 | -re ".* | |
741 | .*$i -1,5,r6\r\n\ | |
742 | .*$i,= -1,5,r6\r\n\ | |
743 | .*$i,< -1,5,r6\r\n\ | |
744 | .*$i,od -1,5,r6\r\n\ | |
745 | .*$i,tr -1,5,r6\r\n\ | |
746 | .*$i,<> -1,5,r6\r\n\ | |
747 | .*$i,>= -1,5,r6\r\n\ | |
748 | .*$i,ev -1,5,r6\r\n\ | |
749 | .*$prompt $" { pass "$i tests" } | |
750 | -re "$prompt $" { fail "$i tests" } | |
751 | timeout { fail "(timeout) $i tests" } | |
752 | } | |
753 | } | |
754 | ||
755 | set extract_insns4 [list {depi} {zdepi} ] | |
756 | ||
757 | foreach i $extract_insns4 { | |
758 | send "x/8i $i"; send "_tests\n" | |
759 | expect { | |
760 | -re ".* | |
761 | .*$i -1,4,10,r6\r\n\ | |
762 | .*$i,= -1,4,10,r6\r\n\ | |
763 | .*$i,< -1,4,10,r6\r\n\ | |
764 | .*$i,od -1,4,10,r6\r\n\ | |
765 | .*$i,tr -1,4,10,r6\r\n\ | |
766 | .*$i,<> -1,4,10,r6\r\n\ | |
767 | .*$i,>= -1,4,10,r6\r\n\ | |
768 | .*$i,ev -1,4,10,r6\r\n\ | |
769 | .*$prompt $" { pass "$i tests" } | |
770 | -re "$prompt $" { fail "$i tests" } | |
771 | timeout { fail "(timeout) $i tests" } | |
772 | } | |
773 | } | |
774 | } | |
775 | ||
776 | proc all_system_control_tests { } { | |
777 | global prompt | |
778 | global hex | |
779 | global decimal | |
780 | ||
781 | send "x/13i system_control_tests\n" | |
782 | expect { | |
783 | -re ".* | |
784 | .*break 5,c\r\n\ | |
785 | .*rfi\r\n\ | |
786 | .*rfir\r\n\ | |
787 | .*ssm 5,r4\r\n\ | |
788 | .*rsm 5,r4\r\n\ | |
789 | .*mtsm r4\r\n\ | |
790 | .*ldsid \(sr0,r5\),r4\r\n\ | |
791 | .*mtsp r4,sr0\r\n\ | |
792 | .*mtctl r4,ccr\r\n\ | |
793 | .*mfsp sr0,r4\r\n\ | |
794 | .*mfctl ccr,r4\r\n\ | |
795 | .*sync\r\n\ | |
796 | .*diag 9a4\r\n\ | |
797 | .*$prompt $" { pass "system_constrol_tests" } | |
798 | -re "$prompt $" { fail "system_control_tests" } | |
799 | timeout { file "(timeout) system_control_tests" } | |
800 | } | |
801 | ||
802 | send "x/4i probe_tests\n" | |
803 | expect { | |
804 | -re ".* | |
805 | .*prober \(sr0,r5\),r6,r7\r\n\ | |
806 | .*proberi \(sr0,r5\),1,r7\r\n\ | |
807 | .*probew \(sr0,r5\),r6,r7\r\n\ | |
808 | .*probewi \(sr0,r5\),1,r7\r\n\ | |
809 | .*$prompt $" { pass "probe_tests" } | |
810 | -re "$prompt $" { fail "probe_tests" } | |
811 | timeout { file "(timeout) probe_tests" } | |
812 | } | |
813 | ||
814 | send "x/4i lpa_tests\n" | |
815 | expect { | |
816 | -re ".* | |
817 | .*lpa r4\(sr0,r5\),r6\r\n\ | |
818 | .*lpa,m r4\(sr0,r5\),r6\r\n\ | |
819 | .*lha r4\(sr0,r5\),r6\r\n\ | |
820 | .*lha,m r4\(sr0,r5\),r6\r\n\ | |
821 | .*$prompt $" { pass "lpa_tests" } | |
822 | -re "$prompt $" { fail "lpa_tests" } | |
823 | timeout { file "(timeout) lpa_tests" } | |
824 | } | |
825 | ||
826 | send "x/18i purge_tests\n" | |
827 | expect { | |
828 | -re ".* | |
829 | .*pdtlb r4\(sr0,r5\)\r\n\ | |
830 | .*pdtlb,m r4\(sr0,r5\)\r\n\ | |
831 | .*pitlb r4\(sr0,r5\)\r\n\ | |
832 | .*pitlb,m r4\(sr0,r5\)\r\n\ | |
833 | .*pdtlbe r4\(sr0,r5\)\r\n\ | |
834 | .*pdtlbe,m r4\(sr0,r5\)\r\n\ | |
835 | .*pitlbe r4\(sr0,r5\)\r\n\ | |
836 | .*pitlbe,m r4\(sr0,r5\)\r\n\ | |
837 | .*pdc r4\(sr0,r5\)\r\n\ | |
838 | .*pdc,m r4\(sr0,r5\)\r\n\ | |
839 | .*fdc r4\(sr0,r5\)\r\n\ | |
840 | .*fdc,m r4\(sr0,r5\)\r\n\ | |
841 | .*fic r4\(sr0,r5\)\r\n\ | |
842 | .*fic,m r4\(sr0,r5\)\r\n\ | |
843 | .*fdce r4\(sr0,r5\)\r\n\ | |
844 | .*fdce,m r4\(sr0,r5\)\r\n\ | |
845 | .*fice r4\(sr0,r5\)\r\n\ | |
846 | .*fice,m r4\(sr0,r5\)\r\n\ | |
847 | .*$prompt $" { pass "purge_tests" } | |
848 | -re "$prompt $" { fail "purge_tests" } | |
849 | timeout { file "(timeout) purge_tests" } | |
850 | } | |
851 | ||
852 | send "x/4i insert_tests\n" | |
853 | expect { | |
854 | -re ".* | |
855 | .*idtlba r4,\(sr0,r5\)\r\n\ | |
856 | .*iitlba r4,\(sr0,r5\)\r\n\ | |
857 | .*idtlbp r4,\(sr0,r5\)\r\n\ | |
858 | .*iitlbp r4,\(sr0,r5\)\r\n\ | |
859 | .*$prompt $" { pass "insert_tests" } | |
860 | -re "$prompt $" { fail "insert_tests" } | |
861 | timeout { file "(timeout) insert_tests" } | |
862 | } | |
863 | ||
864 | } | |
865 | ||
866 | proc all_fpu_memory_tests { } { | |
867 | global prompt | |
868 | global hex | |
869 | global decimal | |
870 | ||
871 | send "x/16i fpu_memory_indexing_tests\n" | |
872 | expect { | |
873 | -re ".* | |
874 | .*fldwx r4\(sr0,r5\),fr6\r\n\ | |
875 | .*fldwx,s r4\(sr0,r5\),fr6\r\n\ | |
876 | .*fldwx,m r4\(sr0,r5\),fr6\r\n\ | |
877 | .*fldwx,sm r4\(sr0,r5\),fr6\r\n\ | |
878 | .*flddx r4\(sr0,r5\),fr6\r\n\ | |
879 | .*flddx,s r4\(sr0,r5\),fr6\r\n\ | |
880 | .*flddx,m r4\(sr0,r5\),fr6\r\n\ | |
881 | .*flddx,sm r4\(sr0,r5\),fr6\r\n\ | |
882 | .*fstwx fr6,r4\(sr0,r5\)\r\n\ | |
883 | .*fstwx,s fr6,r4\(sr0,r5\)\r\n\ | |
884 | .*fstwx,m fr6,r4\(sr0,r5\)\r\n\ | |
885 | .*fstwx,sm fr6,r4\(sr0,r5\)\r\n\ | |
886 | .*fstdx fr6,r4\(sr0,r5\)\r\n\ | |
887 | .*fstdx,s fr6,r4\(sr0,r5\)\r\n\ | |
888 | .*fstdx,m fr6,r4\(sr0,r5\)\r\n\ | |
889 | .*fstdx,sm fr6,r4\(sr0,r5\)\r\n\ | |
890 | .*$prompt $" { pass "fpu_memory_indexing_tests" } | |
891 | -re "$prompt $" { fail "fpu_memory_indexing_tests" } | |
892 | timeout { file "(timeout) fpu_memory_indexing_tests" } | |
893 | } | |
894 | ||
895 | send "x/12i fpu_short_memory_tests\n" | |
896 | expect { | |
897 | -re ".* | |
898 | .*fldws 0\(sr0,r5\),fr6\r\n\ | |
899 | .*fldws,mb 0\(sr0,r5\),fr6\r\n\ | |
900 | .*fldws,ma 0\(sr0,r5\),fr6\r\n\ | |
901 | .*fldds 0\(sr0,r5\),fr6\r\n\ | |
902 | .*fldds,mb 0\(sr0,r5\),fr6\r\n\ | |
903 | .*fldds,ma 0\(sr0,r5\),fr6\r\n\ | |
904 | .*fstws fr6,0\(sr0,r5\)\r\n\ | |
905 | .*fstws,mb fr6,0\(sr0,r5\)\r\n\ | |
906 | .*fstws,ma fr6,0\(sr0,r5\)\r\n\ | |
907 | .*fstds fr6,0\(sr0,r5\)\r\n\ | |
908 | .*fstds,mb fr6,0\(sr0,r5\)\r\n\ | |
909 | .*fstds,ma fr6,0\(sr0,r5\)\r\n\ | |
910 | .*$prompt $" { pass "fpu_short_memory_tests" } | |
911 | -re "$prompt $" { fail "fpu_short_memory_tests" } | |
912 | timeout { file "(timeout) fpu_short_memory_tests" } | |
913 | } | |
914 | ||
915 | } | |
916 | ||
917 | proc all_fpu_computational_tests { } { | |
918 | global prompt | |
919 | global hex | |
920 | global decimal | |
921 | ||
922 | # Fails due to space between copr and ",". | |
923 | setup_xfail "hppa*-*-*" | |
924 | send "x/2i fpu_misc_tests\n" | |
925 | expect { | |
926 | -re ".* | |
927 | .*copr,0,0\r\n\ | |
928 | .*ftest\r\n\ | |
929 | .*$prompt $" { pass "fpu_misc_tests" } | |
930 | -re "$prompt $" { fail "fpu_misc_tests" } | |
931 | timeout { file "(timeout) fpu_misc_tests" } | |
932 | } | |
933 | ||
934 | set fpu_two_op_insns [list {fcpy} {fabs} {fsqrt} {frnd} ] | |
935 | ||
936 | foreach i $fpu_two_op_insns { | |
937 | send "x/5i $i"; send "_tests\n" | |
938 | expect { | |
939 | -re ".* | |
940 | .*$i,sgl fr5,fr10\r\n\ | |
941 | .*$i,dbl fr5,fr10\r\n\ | |
942 | .*$i,quad fr5,fr10\r\n\ | |
943 | .*$i,sgl fr20,fr24\r\n\ | |
944 | .*$i,dbl fr20,fr24\r\n\ | |
945 | .*$prompt $" { pass "$i tests" } | |
946 | -re "$prompt $" { fail "$i tests" } | |
947 | timeout { fail "(timeout) $i tests" } | |
948 | } | |
949 | } | |
950 | ||
951 | set fpu_conversions [list {fcnvff} {fcnvxf} {fcnvfx} {fcnvfxt} ] | |
952 | ||
953 | foreach i $fpu_conversions { | |
954 | send "x/18i $i"; send "_tests\n" | |
955 | expect { | |
956 | -re ".* | |
957 | .*$i,sgl,sgl fr5,fr10\r\n\ | |
958 | .*$i,sgl,dbl fr5,fr10\r\n\ | |
959 | .*$i,sgl,quad fr5,fr10\r\n\ | |
960 | .*$i,dbl,sgl fr5,fr10\r\n\ | |
961 | .*$i,dbl,dbl fr5,fr10\r\n\ | |
962 | .*$i,dbl,quad fr5,fr10\r\n\ | |
963 | .*$i,quad,sgl fr5,fr10\r\n\ | |
964 | .*$i,quad,dbl fr5,fr10\r\n\ | |
965 | .*$i,quad,quad fr5,fr10\r\n\ | |
966 | .*$i,sgl,sgl fr20,fr24\r\n\ | |
967 | .*$i,sgl,dbl fr20,fr24\r\n\ | |
968 | .*$i,sgl,quad fr20,fr24\r\n\ | |
969 | .*$i,dbl,sgl fr20,fr24\r\n\ | |
970 | .*$i,dbl,dbl fr20,fr24\r\n\ | |
971 | .*$i,dbl,quad fr20,fr24\r\n\ | |
972 | .*$i,quad,sgl fr20,fr24\r\n\ | |
973 | .*$i,quad,dbl fr20,fr24\r\n\ | |
974 | .*$i,quad,quad fr20,fr24\r\n\ | |
975 | .*$prompt $" { pass "$i tests" } | |
976 | -re "$prompt $" { fail "$i tests" } | |
977 | timeout { fail "(timeout) $i tests" } | |
978 | } | |
979 | } | |
980 | ||
981 | set fpu_three_op_insns [list {fadd} {fsub} {fmpy} {fdiv} {frem} ] | |
982 | ||
983 | foreach i $fpu_three_op_insns { | |
984 | send "x/6i $i"; send "_tests\n" | |
985 | expect { | |
986 | -re ".* | |
987 | .*$i,sgl fr4,fr8,fr12\r\n\ | |
988 | .*$i,dbl fr4,fr8,fr12\r\n\ | |
989 | .*$i,quad fr4,fr8,fr12\r\n\ | |
990 | .*$i,sgl fr20,fr24,fr28\r\n\ | |
991 | .*$i,dbl fr20,fr24,fr28\r\n\ | |
992 | .*$i,quad fr20,fr24,fr28\r\n\ | |
993 | .*$prompt $" { pass "$i tests" } | |
994 | -re "$prompt $" { fail "$i tests" } | |
995 | timeout { fail "(timeout) $i tests" } | |
996 | } | |
997 | } | |
998 | ||
999 | # Spacing problems, wrong format, wrong registers. Just plain wrong. | |
1000 | setup_xfail hppa*-*-* | |
1001 | send "x/4i fmpy_addsub_tests\n" | |
1002 | expect { | |
1003 | -re ".* | |
1004 | .*fmpyadd,sgl fr16,fr17,fr18,fr19,fr20 | |
1005 | .*fmpyadd,dbl fr16,fr17,fr18,fr19,fr20 | |
1006 | .*fmpysub,sgl fr16,fr17,fr18,fr19,fr20 | |
1007 | .*fmpysub,dbl fr16,fr17,fr18,fr19,fr20 | |
1008 | .*$prompt $" { pass "fmpy_addsub_tests" } | |
1009 | -re "$prompt $" { fail "fmpy_addsub_tests" } | |
1010 | timeout { fail "(timeout) fmpy_addsub_tests" } | |
1011 | } | |
1012 | ||
1013 | # fails because it should not print a format | |
1014 | setup_xfail hppa*-*-* | |
1015 | send "x/i xmpyu_tests\n" | |
1016 | expect { | |
1017 | -re ".* | |
1018 | .*xmpyu fr4,fr5,fr6 | |
1019 | .*$prompt $" {pass "xmpyu_tests" } | |
1020 | -re "$prompt $" {fail "xmpyu_tests" } | |
1021 | timeout { fail "(timeout) xmpyu_tests" } | |
1022 | } | |
1023 | ||
1024 | } | |
1025 | ||
1026 | proc all_fpu_comparison_tests { } { | |
1027 | global prompt | |
1028 | global hex | |
1029 | global decimal | |
1030 | ||
1031 | set fpu_comparison_formats [list {sgl} {dbl} {quad} ] | |
1032 | ||
1033 | # Fails due to spacing and probably formatting problems. | |
1034 | foreach i $fpu_comparison_formats { | |
1035 | setup_xfail "hppa*-*-*" | |
1036 | send "x/32i fcmp_$i"; send "_tests\n" | |
1037 | expect { | |
1038 | -re ".* | |
1039 | .*fcmp,$i,false? fr5,fr10\r\n\ | |
1040 | .*fcmp,$i,false fr5,fr10\r\n\ | |
1041 | .*fcmp,$i,\? fr5,fr10\r\n\ | |
1042 | .*fcmp,$i,!<=> fr5,fr10\r\n\ | |
1043 | .*fcmp,$i,= fr5,fr10\r\n\ | |
1044 | .*fcmp,$i,=t fr5,fr10\r\n\ | |
1045 | .*fcmp,$i,\?= fr5,fr10\r\n\ | |
1046 | .*fcmp,$i,!<> fr5,fr10\r\n\ | |
1047 | .*fcmp,$i,!\?>= fr5,fr10\r\n\ | |
1048 | .*fcmp,$i,< fr5,fr10\r\n\ | |
1049 | .*fcmp,$i,\?< fr5,fr10\r\n\ | |
1050 | .*fcmp,$i,!>= fr5,fr10\r\n\ | |
1051 | .*fcmp,$i,!\?> fr5,fr10\r\n\ | |
1052 | .*fcmp,$i,<= fr5,fr10\r\n\ | |
1053 | .*fcmp,$i,\?<= fr5,fr10\r\n\ | |
1054 | .*fcmp,$i,!> fr5,fr10\r\n\ | |
1055 | .*fcmp,$i,!\?<= fr5,fr10\r\n\ | |
1056 | .*fcmp,$i,> fr5,fr10\r\n\ | |
1057 | .*fcmp,$i,\?> fr5,fr10\r\n\ | |
1058 | .*fcmp,$i,!<= fr5,fr10\r\n\ | |
1059 | .*fcmp,$i,!\?< fr5,fr10\r\n\ | |
1060 | .*fcmp,$i,>= fr5,fr10\r\n\ | |
1061 | .*fcmp,$i,\?>= fr5,fr10\r\n\ | |
1062 | .*fcmp,$i,!< fr5,fr10\r\n\ | |
1063 | .*fcmp,$i,!\?= fr5,fr10\r\n\ | |
1064 | .*fcmp,$i,<> fr5,fr10\r\n\ | |
1065 | .*fcmp,$i,!= fr5,fr10\r\n\ | |
1066 | .*fcmp,$i,!=t fr5,fr10\r\n\ | |
1067 | .*fcmp,$i,!\? fr5,fr10\r\n\ | |
1068 | .*fcmp,$i,<=> fr5,fr10\r\n\ | |
1069 | .*fcmp,$i,true? fr5,fr10\r\n\ | |
1070 | .*fcmp,$i,true fr5,fr10\r\n\ | |
1071 | .*$prompt $" { pass "$i tests" } | |
1072 | -re "$prompt $" { fail "fcmp_$i tests" } | |
1073 | timeout { fail "(timeout) fcmp_$i tests" } | |
1074 | } | |
1075 | } | |
1076 | } | |
1077 | ||
1078 | proc all_special_tests { } { | |
1079 | global prompt | |
1080 | global hex | |
1081 | global decimal | |
1082 | ||
1083 | send "x/4i special_tests\n" | |
1084 | expect { | |
1085 | -re ".* | |
1086 | .*gfw r4\(sr0,r5\)\r\n\ | |
1087 | .*gfw,m r4\(sr0,r5\)\r\n\ | |
1088 | .*gfr r4\(sr0,r5\)\r\n\ | |
1089 | .*gfr,m r4\(sr0,r5\)\r\n\ | |
1090 | .*$prompt $" { pass "special tests" } | |
1091 | -re "$prompt $" { fail "special tests" } | |
1092 | timeout { fail "(timeout) special tests " } | |
1093 | } | |
1094 | ||
1095 | } | |
1096 | ||
1097 | # Start with a fresh gdb. | |
1098 | ||
1099 | gdb_exit | |
1100 | gdb_start | |
1101 | gdb_reinitialize_dir $srcdir/$subdir | |
1102 | gdb_load $objdir/$subdir/$binfile | |
1103 | ||
1104 | if [istarget "hppa*-*-*"] then { | |
8092225e JK |
1105 | all_integer_memory_tests |
1106 | all_immediate_tests | |
1107 | all_branch_tests | |
1108 | all_integer_computational_tests | |
1109 | all_system_control_tests | |
1110 | all_fpu_memory_tests | |
1111 | all_fpu_computational_tests | |
1112 | all_fpu_comparison_tests | |
47882638 JK |
1113 | all_special_tests |
1114 | } |