1 # Copyright
(C
) 2003-2019 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
3 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
, see
<http
://www.gnu.org
/licenses
/>.
16 # This file was written by Michael Snyder
(msnyder@redhat.com
)
18 if ![istarget
"h8300*-*-*"] {
19 verbose
"Tests ignored for all but h8300s based targets."
24 set testfile
"t07_ari3"
25 set srcfile $
{srcdir
}/$
{subdir
}/$
{testfile
}.s
26 set objfile $
{objdir
}/$
{subdir
}/$
{testfile
}.o
27 set binfile $
{objdir
}/$
{subdir
}/$
{testfile
}.x
30 set link
-flags
"-m h8300sxelf"
33 if {[target_assemble $srcfile $objfile
"${asm-flags}"] != ""} then {
34 untested
"failed to assemble"
38 if {[target_link $objfile $binfile
"${link-flags}"] != ""} then {
39 untested
"failed to link"
44 gdb_reinitialize_dir $srcdir
/$subdir
47 gdb_test
"x /i start" "neg.b\tr1h" \
49 gdb_test
"x" "neg.b\t@er1" \
51 gdb_test
"x" "neg.b\t@\\(0x3(:2|),er1\\)" \
53 gdb_test
"x" "neg.b\t@er1\\+" \
55 gdb_test
"x" "neg.b\t@-er1" \
57 gdb_test
"x" "neg.b\t@\\+er1" \
59 gdb_test
"x" "neg.b\t@er1-" \
61 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),er1\\)" \
62 "neg.b @(0x1234:16,er1)"
63 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),er1\\)" \
64 "neg.b @(0x12345678:32,er1)"
65 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),r2l.b\\)" \
66 "neg.b @(0x1234:16,r2l.b)"
67 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),r2.w\\)" \
68 "neg.b @(0x1234:16,r2.w)"
69 gdb_test
"x" "neg.b\t@\\(0x1234(:16|),er2.l\\)" \
70 "neg.b @(0x1234:16,er2.l)"
71 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),r2l.b\\)" \
72 "neg.b @(0x12345678:32,r2l.b)"
73 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),r2.w\\)" \
74 "neg.b @(0x12345678:32,r2.w)"
75 gdb_test
"x" "neg.b\t@\\(0x12345678(:32|),er2.l\\)" \
76 "neg.b @(0x12345678:32,er2.l)"
77 gdb_test
"x" "neg.b\t@0x12(:8|)" \
79 gdb_test
"x" "neg.b\t@0x1234(:16|)" \
81 gdb_test
"x" "neg.b\t@0x12345678(:32|)" \
82 "neg.b @0x12345678:32"
83 gdb_test
"x" "neg.w\tr1" \
85 gdb_test
"x" "neg.w\t@er1" \
87 gdb_test
"x" "neg.w\t@\\(0x6(:2|),er1\\)" \
89 gdb_test
"x" "neg.w\t@er1\\+" \
91 gdb_test
"x" "neg.w\t@-er1" \
93 gdb_test
"x" "neg.w\t@\\+er1" \
95 gdb_test
"x" "neg.w\t@er1-" \
97 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),er1\\)" \
98 "neg.w @(0x1234:16,er1)"
99 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),er1\\)" \
100 "neg.w @(0x12345678:32,er1)"
101 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),r2l.b\\)" \
102 "neg.w @(0x1234:16,r2l.b)"
103 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),r2.w\\)" \
104 "neg.w @(0x1234:16,r2.w)"
105 gdb_test
"x" "neg.w\t@\\(0x1234(:16|),er2.l\\)" \
106 "neg.w @(0x1234:16,er2.l)"
107 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),r2l.b\\)" \
108 "neg.w @(0x12345678:32,r2l.b)"
109 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),r2.w\\)" \
110 "neg.w @(0x12345678:32,r2.w)"
111 gdb_test
"x" "neg.w\t@\\(0x12345678(:32|),er2.l\\)" \
112 "neg.w @(0x12345678:32,er2.l)"
113 gdb_test
"x" "neg.w\t@0x1234(:16|)" \
115 gdb_test
"x" "neg.w\t@0x12345678(:32|)" \
116 "neg.w @0x12345678:32"
117 gdb_test
"x" "neg.l\ter1" \
119 gdb_test
"x" "neg.l\t@er1" \
121 gdb_test
"x" "neg.l\t@\\(0xc(:2|),er1\\)" \
123 gdb_test
"x" "neg.l\t@er1\\+" \
125 gdb_test
"x" "neg.l\t@-er1" \
127 gdb_test
"x" "neg.l\t@\\+er1" \
129 gdb_test
"x" "neg.l\t@er1-" \
131 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),er1\\)" \
132 "neg.l @(0x1234:16,er1)"
133 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),er1\\)" \
134 "neg.l @(0x12345678:32,er1)"
135 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),r2l.b\\)" \
136 "neg.l @(0x1234:16,r2l.b)"
137 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),r2.w\\)" \
138 "neg.l @(0x1234:16,r2.w)"
139 gdb_test
"x" "neg.l\t@\\(0x1234(:16|),er2.l\\)" \
140 "neg.l @(0x1234:16,er2.l)"
141 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),r2l.b\\)" \
142 "neg.l @(0x12345678:32,r2l.b)"
143 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),r2.w\\)" \
144 "neg.l @(0x12345678:32,r2.w)"
145 gdb_test
"x" "neg.l\t@\\(0x12345678(:32|),er2.l\\)" \
146 "neg.l @(0x12345678:32,er2.l)"
147 gdb_test
"x" "neg.l\t@0x1234(:16|)" \
149 gdb_test
"x" "neg.l\t@0x12345678(:32|)" \
150 "neg.l @0x12345678:32"
151 gdb_test
"x" "tas\t@er1" \
153 gdb_test
"x" "extu.w\tr1" \
155 gdb_test
"x" "extu.w\t@er1" \
157 gdb_test
"x" "extu.w\t@\\(0x6(:2|),er1\\)" \
158 "extu.w @(0x6:2,er1)"
159 gdb_test
"x" "extu.w\t@er1\\+" \
161 gdb_test
"x" "extu.w\t@-er1" \
163 gdb_test
"x" "extu.w\t@\\+er1" \
165 gdb_test
"x" "extu.w\t@er1-" \
167 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),er1\\)" \
168 "extu.w @(0x1234:16,er1)"
169 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),er1\\)" \
170 "extu.w @(0x12345678:32,er1)"
171 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),r2l.b\\)" \
172 "extu.w @(0x1234:16,r2l.b)"
173 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),r2.w\\)" \
174 "extu.w @(0x1234:16,r2.w)"
175 gdb_test
"x" "extu.w\t@\\(0x1234(:16|),er2.l\\)" \
176 "extu.w @(0x1234:16,er2.l)"
177 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),r2l.b\\)" \
178 "extu.w @(0x12345678:32,r2l.b)"
179 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),r2.w\\)" \
180 "extu.w @(0x12345678:32,r2.w)"
181 gdb_test
"x" "extu.w\t@\\(0x12345678(:32|),er2.l\\)" \
182 "extu.w @(0x12345678:32,er2.l)"
183 gdb_test
"x" "extu.w\t@0x1234(:16|)" \
185 gdb_test
"x" "extu.w\t@0x12345678(:32|)" \
186 "extu.w @0x12345678:32"
187 gdb_test
"x" "extu.l\ter1" \
189 gdb_test
"x" "extu.l\t@er1" \
191 gdb_test
"x" "extu.l\t@\\(0xc(:2|),er1\\)" \
192 "extu.l @(0xc:2,er1)"
193 gdb_test
"x" "extu.l\t@er1\\+" \
195 gdb_test
"x" "extu.l\t@-er1" \
197 gdb_test
"x" "extu.l\t@\\+er1" \
199 gdb_test
"x" "extu.l\t@er1-" \
201 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),er1\\)" \
202 "extu.l @(0x1234:16,er1)"
203 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),er1\\)" \
204 "extu.l @(0x12345678:32,er1)"
205 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),r2l.b\\)" \
206 "extu.l @(0x1234:16,r2l.b)"
207 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),r2.w\\)" \
208 "extu.l @(0x1234:16,r2.w)"
209 gdb_test
"x" "extu.l\t@\\(0x1234(:16|),er2.l\\)" \
210 "extu.l @(0x1234:16,er2.l)"
211 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),r2l.b\\)" \
212 "extu.l @(0x12345678:32,r2l.b)"
213 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),r2.w\\)" \
214 "extu.l @(0x12345678:32,r2.w)"
215 gdb_test
"x" "extu.l\t@\\(0x12345678(:32|),er2.l\\)" \
216 "extu.l @(0x12345678:32,er2.l)"
217 gdb_test
"x" "extu.l\t@0x1234(:16|)" \
219 gdb_test
"x" "extu.l\t@0x12345678(:32|)" \
220 "extu.l @0x12345678:32"
221 gdb_test
"x" "extu.l\t#2,er1" \
223 gdb_test
"x" "extu.l\t#2,@er1" \
225 gdb_test
"x" "extu.l\t#2,@\\(0xc(:2|),er1\\)" \
226 "extu.l #2,@(0xc:2,er1)"
227 gdb_test
"x" "extu.l\t#2,@er1\\+" \
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,@er1-" \
235 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),er1\\)" \
236 "extu.l #2,@(0x1234:16,er1)"
237 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),er1\\)" \
238 "extu.l #2,@(0x12345678:32,er1)"
239 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),r2l.b\\)" \
240 "extu.l #2,@(0x1234:16,r2l.b)"
241 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),r2.w\\)" \
242 "extu.l #2,@(0x1234:16,r2.w)"
243 gdb_test
"x" "extu.l\t#2,@\\(0x1234(:16|),er2.l\\)" \
244 "extu.l #2,@(0x1234:16,er2.l)"
245 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),r2l.b\\)" \
246 "extu.l #2,@(0x12345678:32,r2l.b)"
247 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),r2.w\\)" \
248 "extu.l #2,@(0x12345678:32,r2.w)"
249 gdb_test
"x" "extu.l\t#2,@\\(0x12345678(:32|),er2.l\\)" \
250 "extu.l #2,@(0x12345678:32,er2.l)"
251 gdb_test
"x" "extu.l\t#2,@0x1234(:16|)" \
252 "extu.l #2,@0x1234:16"
253 gdb_test
"x" "extu.l\t#2,@0x12345678(:32|)" \
254 "extu.l #2,@0x12345678:32"
255 gdb_test
"x" "exts.w\tr1" \
257 gdb_test
"x" "exts.w\t@er1" \
259 gdb_test
"x" "exts.w\t@\\(0x6(:2|),er1\\)" \
260 "exts.w @(0x6:2,er1)"
261 gdb_test
"x" "exts.w\t@er1\\+" \
263 gdb_test
"x" "exts.w\t@-er1" \
265 gdb_test
"x" "exts.w\t@\\+er1" \
267 gdb_test
"x" "exts.w\t@er1-" \
269 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),er1\\)" \
270 "exts.w @(0x1234:16,er1)"
271 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),er1\\)" \
272 "exts.w @(0x12345678:32,er1)"
273 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),r2l.b\\)" \
274 "exts.w @(0x1234:16,r2l.b)"
275 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),r2.w\\)" \
276 "exts.w @(0x1234:16,r2.w)"
277 gdb_test
"x" "exts.w\t@\\(0x1234(:16|),er2.l\\)" \
278 "exts.w @(0x1234:16,er2.l)"
279 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),r2l.b\\)" \
280 "exts.w @(0x12345678:32,r2l.b)"
281 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),r2.w\\)" \
282 "exts.w @(0x12345678:32,r2.w)"
283 gdb_test
"x" "exts.w\t@\\(0x12345678(:32|),er2.l\\)" \
284 "exts.w @(0x12345678:32,er2.l)"
285 gdb_test
"x" "exts.w\t@0x1234(:16|)" \
287 gdb_test
"x" "exts.w\t@0x12345678(:32|)" \
288 "exts.w @0x12345678:32"
289 gdb_test
"x" "exts.l\ter1" \
291 gdb_test
"x" "exts.l\t@er1" \
293 gdb_test
"x" "exts.l\t@\\(0xc(:2|),er1\\)" \
294 "exts.l @(0xc:2,er1)"
295 gdb_test
"x" "exts.l\t@er1\\+" \
297 gdb_test
"x" "exts.l\t@-er1" \
299 gdb_test
"x" "exts.l\t@\\+er1" \
301 gdb_test
"x" "exts.l\t@er1-" \
303 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),er1\\)" \
304 "exts.l @(0x1234:16,er1)"
305 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),er1\\)" \
306 "exts.l @(0x12345678:32,er1)"
307 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),r2l.b\\)" \
308 "exts.l @(0x1234:16,r2l.b)"
309 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),r2.w\\)" \
310 "exts.l @(0x1234:16,r2.w)"
311 gdb_test
"x" "exts.l\t@\\(0x1234(:16|),er2.l\\)" \
312 "exts.l @(0x1234:16,er2.l)"
313 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),r2l.b\\)" \
314 "exts.l @(0x12345678:32,r2l.b)"
315 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),r2.w\\)" \
316 "exts.l @(0x12345678:32,r2.w)"
317 gdb_test
"x" "exts.l\t@\\(0x12345678(:32|),er2.l\\)" \
318 "exts.l @(0x12345678:32,er2.l)"
319 gdb_test
"x" "exts.l\t@0x1234(:16|)" \
321 gdb_test
"x" "exts.l\t@0x12345678(:32|)" \
322 "exts.l @0x12345678:32"
323 gdb_test
"x" "exts.l\t#2,er1" \
325 gdb_test
"x" "exts.l\t#2,@er1" \
327 gdb_test
"x" "exts.l\t#2,@\\(0xc(:2|),er1\\)" \
328 "exts.l #2,@(0xc:2,er1)"
329 gdb_test
"x" "exts.l\t#2,@er1\\+" \
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,@er1-" \
337 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),er1\\)" \
338 "exts.l #2,@(0x1234:16,er1)"
339 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),er1\\)" \
340 "exts.l #2,@(0x12345678:32,er1)"
341 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),r2l.b\\)" \
342 "exts.l #2,@(0x1234:16,r2l.b)"
343 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),r2.w\\)" \
344 "exts.l #2,@(0x1234:16,r2.w)"
345 gdb_test
"x" "exts.l\t#2,@\\(0x1234(:16|),er2.l\\)" \
346 "exts.l #2,@(0x1234:16,er2.l)"
347 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),r2l.b\\)" \
348 "exts.l #2,@(0x12345678:32,r2l.b)"
349 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),r2.w\\)" \
350 "exts.l #2,@(0x12345678:32,r2.w)"
351 gdb_test
"x" "exts.l\t#2,@\\(0x12345678(:32|),er2.l\\)" \
352 "exts.l #2,@(0x12345678:32,er2.l)"
353 gdb_test
"x" "exts.l\t#2,@0x1234(:16|)" \
354 "exts.l #2,@0x1234:16"
355 gdb_test
"x" "exts.l\t#2,@0x12345678(:32|)" \
356 "exts.l #2,@0x12345678:32"