1 # Copyright
(C
) 2003 Free Software Foundation
, Inc.
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.
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.
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.
, 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA.
17 # Please email
any bugs
, comments
, and
/or additions to this file to
:
18 # bug
-gdb@prep.ai.mit.edu
20 # This file was written by Michael Snyder
(msnyder@redhat.com
)
26 if ![istarget
"h8300*-*-*"] {
27 verbose
"Tests ignored for all but h8300s based targets."
34 set testfile
"t07_ari3"
35 set srcfile $
{srcdir
}/$
{subdir
}/$
{testfile
}.s
36 set objfile $
{objdir
}/$
{subdir
}/$
{testfile
}.o
37 set binfile $
{objdir
}/$
{subdir
}/$
{testfile
}.x
40 set link
-flags
"-m h8300sxelf";
43 if {[target_assemble $srcfile $objfile
"${asm-flags}"] != ""} then {
44 gdb_suppress_entire_file
"Testcase assembly failed, so all tests in this file will automatically fail."
47 if {[target_link $objfile $binfile
"${link-flags}"] != ""} then {
48 gdb_suppress_entire_file
"Testcase link failed, so all tests in this file will automatically fail."
52 gdb_reinitialize_dir $srcdir
/$subdir
55 gdb_test
"x /i _start" "neg.b\tr1h" \
57 gdb_test
"x" "neg.b\t@er1" \
59 gdb_test
"x" "neg.b\t@\\(0x3(:2|),er1\\)" \
61 gdb_test
"x" "neg.b\t@er1\\+" \
63 gdb_test
"x" "neg.b\t@-er1" \
65 gdb_test
"x" "neg.b\t@\\+er1" \
67 gdb_test
"x" "neg.b\t@er1-" \
69 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),er1\\)" \
70 "neg.b @(0x1234:16,er1)"
71 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),er1\\)" \
72 "neg.b @(0x12345678:32,er1)"
73 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),r2l.b\\)" \
74 "neg.b @(0x1234:16,r2l.b)"
75 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),r2.w\\)" \
76 "neg.b @(0x1234:16,r2.w)"
77 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),er2.l\\)" \
78 "neg.b @(0x1234:16,er2.l)"
79 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),r2l.b\\)" \
80 "neg.b @(0x12345678:32,r2l.b)"
81 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),r2.w\\)" \
82 "neg.b @(0x12345678:32,r2.w)"
83 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),er2.l\\)" \
84 "neg.b @(0x12345678:32,er2.l)"
85 gdb_test
"x" "neg.b\t@0x12(:8|)" \
87 gdb_test
"x" "neg.b\t@0x1234(:16|)" \
89 gdb_test
"x" "neg.b\t@0x12345678(:32|)" \
90 "neg.b @0x12345678:32"
91 gdb_test
"x" "neg.w\tr1" \
93 gdb_test
"x" "neg.w\t@er1" \
95 gdb_test
"x" "neg.w\t@\\(0x6(:2|),er1\\)" \
97 gdb_test
"x" "neg.w\t@er1\\+" \
99 gdb_test
"x" "neg.w\t@-er1" \
101 gdb_test
"x" "neg.w\t@\\+er1" \
103 gdb_test
"x" "neg.w\t@er1-" \
105 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),er1\\)" \
106 "neg.w @(0x1234:16,er1)"
107 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),er1\\)" \
108 "neg.w @(0x12345678:32,er1)"
109 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),r2l.b\\)" \
110 "neg.w @(0x1234:16,r2l.b)"
111 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),r2.w\\)" \
112 "neg.w @(0x1234:16,r2.w)"
113 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),er2.l\\)" \
114 "neg.w @(0x1234:16,er2.l)"
115 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),r2l.b\\)" \
116 "neg.w @(0x12345678:32,r2l.b)"
117 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),r2.w\\)" \
118 "neg.w @(0x12345678:32,r2.w)"
119 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),er2.l\\)" \
120 "neg.w @(0x12345678:32,er2.l)"
121 gdb_test
"x" "neg.w\t@0x1234(:16|)" \
123 gdb_test
"x" "neg.w\t@0x12345678(:32|)" \
124 "neg.w @0x12345678:32"
125 gdb_test
"x" "neg.l\ter1" \
127 gdb_test
"x" "neg.l\t@er1" \
129 gdb_test
"x" "neg.l\t@\\(0xc(:2|),er1\\)" \
131 gdb_test
"x" "neg.l\t@er1\\+" \
133 gdb_test
"x" "neg.l\t@-er1" \
135 gdb_test
"x" "neg.l\t@\\+er1" \
137 gdb_test
"x" "neg.l\t@er1-" \
139 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),er1\\)" \
140 "neg.l @(0x1234:16,er1)"
141 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),er1\\)" \
142 "neg.l @(0x12345678:32,er1)"
143 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),r2l.b\\)" \
144 "neg.l @(0x1234:16,r2l.b)"
145 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),r2.w\\)" \
146 "neg.l @(0x1234:16,r2.w)"
147 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),er2.l\\)" \
148 "neg.l @(0x1234:16,er2.l)"
149 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),r2l.b\\)" \
150 "neg.l @(0x12345678:32,r2l.b)"
151 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),r2.w\\)" \
152 "neg.l @(0x12345678:32,r2.w)"
153 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),er2.l\\)" \
154 "neg.l @(0x12345678:32,er2.l)"
155 gdb_test
"x" "neg.l\t@0x1234(:16|)" \
157 gdb_test
"x" "neg.l\t@0x12345678(:32|)" \
158 "neg.l @0x12345678:32"
159 gdb_test
"x" "tas\t@er1" \
161 gdb_test
"x" "extu.w\tr1" \
163 gdb_test
"x" "extu.w\t@er1" \
165 gdb_test
"x" "extu.w\t@\\(0x6(:2|),er1\\)" \
166 "extu.w @(0x6:2,er1)"
167 gdb_test
"x" "extu.w\t@er1\\+" \
169 gdb_test
"x" "extu.w\t@-er1" \
171 gdb_test
"x" "extu.w\t@\\+er1" \
173 gdb_test
"x" "extu.w\t@er1-" \
175 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),er1\\)" \
176 "extu.w @(0x1234:16,er1)"
177 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),er1\\)" \
178 "extu.w @(0x12345678:32,er1)"
179 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),r2l.b\\)" \
180 "extu.w @(0x1234:16,r2l.b)"
181 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),r2.w\\)" \
182 "extu.w @(0x1234:16,r2.w)"
183 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),er2.l\\)" \
184 "extu.w @(0x1234:16,er2.l)"
185 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),r2l.b\\)" \
186 "extu.w @(0x12345678:32,r2l.b)"
187 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),r2.w\\)" \
188 "extu.w @(0x12345678:32,r2.w)"
189 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),er2.l\\)" \
190 "extu.w @(0x12345678:32,er2.l)"
191 gdb_test
"x" "extu.w\t@0x1234(:16|)" \
193 gdb_test
"x" "extu.w\t@0x12345678(:32|)" \
194 "extu.w @0x12345678:32"
195 gdb_test
"x" "extu.l\ter1" \
197 gdb_test
"x" "extu.l\t@er1" \
199 gdb_test
"x" "extu.l\t@\\(0xc(:2|),er1\\)" \
200 "extu.l @(0xc:2,er1)"
201 gdb_test
"x" "extu.l\t@er1\\+" \
203 gdb_test
"x" "extu.l\t@-er1" \
205 gdb_test
"x" "extu.l\t@\\+er1" \
207 gdb_test
"x" "extu.l\t@er1-" \
209 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),er1\\)" \
210 "extu.l @(0x1234:16,er1)"
211 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),er1\\)" \
212 "extu.l @(0x12345678:32,er1)"
213 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),r2l.b\\)" \
214 "extu.l @(0x1234:16,r2l.b)"
215 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),r2.w\\)" \
216 "extu.l @(0x1234:16,r2.w)"
217 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),er2.l\\)" \
218 "extu.l @(0x1234:16,er2.l)"
219 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),r2l.b\\)" \
220 "extu.l @(0x12345678:32,r2l.b)"
221 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),r2.w\\)" \
222 "extu.l @(0x12345678:32,r2.w)"
223 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),er2.l\\)" \
224 "extu.l @(0x12345678:32,er2.l)"
225 gdb_test
"x" "extu.l\t@0x1234(:16|)" \
227 gdb_test
"x" "extu.l\t@0x12345678(:32|)" \
228 "extu.l @0x12345678:32"
229 gdb_test
"x" "extu.l\t#2,er1" \
231 gdb_test
"x" "extu.l\t#2,@er1" \
233 gdb_test
"x" "extu.l\t#2,@\\(0xc(:2|),er1\\)" \
234 "extu.l #2,@(0xc:2,er1)"
235 gdb_test
"x" "extu.l\t#2,@er1\\+" \
237 gdb_test
"x" "extu.l\t#2,@-er1" \
239 gdb_test
"x" "extu.l\t#2,@\\+er1" \
241 gdb_test
"x" "extu.l\t#2,@er1-" \
243 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),er1\\)" \
244 "extu.l #2,@(0x1234:16,er1)"
245 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),er1\\)" \
246 "extu.l #2,@(0x12345678:32,er1)"
247 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),r2l.b\\)" \
248 "extu.l #2,@(0x1234:16,r2l.b)"
249 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),r2.w\\)" \
250 "extu.l #2,@(0x1234:16,r2.w)"
251 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),er2.l\\)" \
252 "extu.l #2,@(0x1234:16,er2.l)"
253 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),r2l.b\\)" \
254 "extu.l #2,@(0x12345678:32,r2l.b)"
255 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),r2.w\\)" \
256 "extu.l #2,@(0x12345678:32,r2.w)"
257 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),er2.l\\)" \
258 "extu.l #2,@(0x12345678:32,er2.l)"
259 gdb_test
"x" "extu.l\t#2,@0x1234(:16|)" \
260 "extu.l #2,@0x1234:16"
261 gdb_test
"x" "extu.l\t#2,@0x12345678(:32|)" \
262 "extu.l #2,@0x12345678:32"
263 gdb_test
"x" "exts.w\tr1" \
265 gdb_test
"x" "exts.w\t@er1" \
267 gdb_test
"x" "exts.w\t@\\(0x6(:2|),er1\\)" \
268 "exts.w @(0x6:2,er1)"
269 gdb_test
"x" "exts.w\t@er1\\+" \
271 gdb_test
"x" "exts.w\t@-er1" \
273 gdb_test
"x" "exts.w\t@\\+er1" \
275 gdb_test
"x" "exts.w\t@er1-" \
277 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),er1\\)" \
278 "exts.w @(0x1234:16,er1)"
279 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),er1\\)" \
280 "exts.w @(0x12345678:32,er1)"
281 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),r2l.b\\)" \
282 "exts.w @(0x1234:16,r2l.b)"
283 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),r2.w\\)" \
284 "exts.w @(0x1234:16,r2.w)"
285 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),er2.l\\)" \
286 "exts.w @(0x1234:16,er2.l)"
287 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),r2l.b\\)" \
288 "exts.w @(0x12345678:32,r2l.b)"
289 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),r2.w\\)" \
290 "exts.w @(0x12345678:32,r2.w)"
291 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),er2.l\\)" \
292 "exts.w @(0x12345678:32,er2.l)"
293 gdb_test
"x" "exts.w\t@0x1234(:16|)" \
295 gdb_test
"x" "exts.w\t@0x12345678(:32|)" \
296 "exts.w @0x12345678:32"
297 gdb_test
"x" "exts.l\ter1" \
299 gdb_test
"x" "exts.l\t@er1" \
301 gdb_test
"x" "exts.l\t@\\(0xc(:2|),er1\\)" \
302 "exts.l @(0xc:2,er1)"
303 gdb_test
"x" "exts.l\t@er1\\+" \
305 gdb_test
"x" "exts.l\t@-er1" \
307 gdb_test
"x" "exts.l\t@\\+er1" \
309 gdb_test
"x" "exts.l\t@er1-" \
311 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),er1\\)" \
312 "exts.l @(0x1234:16,er1)"
313 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),er1\\)" \
314 "exts.l @(0x12345678:32,er1)"
315 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),r2l.b\\)" \
316 "exts.l @(0x1234:16,r2l.b)"
317 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),r2.w\\)" \
318 "exts.l @(0x1234:16,r2.w)"
319 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),er2.l\\)" \
320 "exts.l @(0x1234:16,er2.l)"
321 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),r2l.b\\)" \
322 "exts.l @(0x12345678:32,r2l.b)"
323 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),r2.w\\)" \
324 "exts.l @(0x12345678:32,r2.w)"
325 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),er2.l\\)" \
326 "exts.l @(0x12345678:32,er2.l)"
327 gdb_test
"x" "exts.l\t@0x1234(:16|)" \
329 gdb_test
"x" "exts.l\t@0x12345678(:32|)" \
330 "exts.l @0x12345678:32"
331 gdb_test
"x" "exts.l\t#2,er1" \
333 gdb_test
"x" "exts.l\t#2,@er1" \
335 gdb_test
"x" "exts.l\t#2,@\\(0xc(:2|),er1\\)" \
336 "exts.l #2,@(0xc:2,er1)"
337 gdb_test
"x" "exts.l\t#2,@er1\\+" \
339 gdb_test
"x" "exts.l\t#2,@-er1" \
341 gdb_test
"x" "exts.l\t#2,@\\+er1" \
343 gdb_test
"x" "exts.l\t#2,@er1-" \
345 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),er1\\)" \
346 "exts.l #2,@(0x1234:16,er1)"
347 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),er1\\)" \
348 "exts.l #2,@(0x12345678:32,er1)"
349 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),r2l.b\\)" \
350 "exts.l #2,@(0x1234:16,r2l.b)"
351 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),r2.w\\)" \
352 "exts.l #2,@(0x1234:16,r2.w)"
353 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),er2.l\\)" \
354 "exts.l #2,@(0x1234:16,er2.l)"
355 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),r2l.b\\)" \
356 "exts.l #2,@(0x12345678:32,r2l.b)"
357 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),r2.w\\)" \
358 "exts.l #2,@(0x12345678:32,r2.w)"
359 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),er2.l\\)" \
360 "exts.l #2,@(0x12345678:32,er2.l)"
361 gdb_test
"x" "exts.l\t#2,@0x1234(:16|)" \
362 "exts.l #2,@0x1234:16"
363 gdb_test
"x" "exts.l\t#2,@0x12345678(:32|)" \
364 "exts.l #2,@0x12345678:32"