Switch the license of all .exp files to GPLv3.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.disasm / t13_otr.exp
CommitLineData
6aba47ca 1# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
57ba3b85
MS
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
e22f8b7c 5# the Free Software Foundation; either version 3 of the License, or
57ba3b85 6# (at your option) any later version.
e22f8b7c 7#
57ba3b85
MS
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.
e22f8b7c 12#
57ba3b85 13# You should have received a copy of the GNU General Public License
e22f8b7c 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
57ba3b85
MS
15
16# Please email any bugs, comments, and/or additions to this file to:
17# bug-gdb@prep.ai.mit.edu
18
19# This file was written by Michael Snyder (msnyder@redhat.com)
20
21if $tracelevel then {
22 strace $tracelevel
23}
24
25if ![istarget "h8300*-*-*"] {
26 verbose "Tests ignored for all but h8300s based targets."
27 return
28}
29
30set prms_id 0
31set bug_id 0
32
33set testfile "t13_otr"
34set srcfile ${srcdir}/${subdir}/${testfile}.s
35set objfile ${objdir}/${subdir}/${testfile}.o
36set binfile ${objdir}/${subdir}/${testfile}.x
37
38set asm-flags "";
39set link-flags "-m h8300sxelf";
40
41
42if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
b60f0898
JB
43 untested t13_otr.exp
44 return -1
57ba3b85
MS
45}
46
47if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
b60f0898
JB
48 untested t13_otr.exp
49 return -1
57ba3b85
MS
50}
51
52gdb_start
53gdb_reinitialize_dir $srcdir/$subdir
54gdb_load $binfile
55
56global hex
57
58gdb_test "x /i _start" "bra\t.\\+18 \\($hex\\)" \
59 "bra .+18"
60gdb_test "x" "brn\t.\\+18 \\($hex\\)" \
61 "brn .+18"
62gdb_test "x" "bhi\t.\\+18 \\($hex\\)" \
63 "bhi .+18"
64gdb_test "x" "bls\t.\\+18 \\($hex\\)" \
65 "bls .+18"
66gdb_test "x" "bcc\t.\\+18 \\($hex\\)" \
67 "bcc .+18"
68gdb_test "x" "bcs\t.\\+18 \\($hex\\)" \
69 "bcs .+18"
70gdb_test "x" "bne\t.\\+18 \\($hex\\)" \
71 "bne .+18"
72gdb_test "x" "beq\t.\\+18 \\($hex\\)" \
73 "beq .+18"
74gdb_test "x" "bvc\t.\\+18 \\($hex\\)" \
75 "bvc .+18"
76gdb_test "x" "bvs\t.\\+18 \\($hex\\)" \
77 "bvs .+18"
78gdb_test "x" "bpl\t.\\+18 \\($hex\\)" \
79 "bpl .+18"
80gdb_test "x" "bmi\t.\\+18 \\($hex\\)" \
81 "bmi .+18"
82gdb_test "x" "bge\t.\\+18 \\($hex\\)" \
83 "bge .+18"
84gdb_test "x" "blt\t.\\+18 \\($hex\\)" \
85 "blt .+18"
86gdb_test "x" "bgt\t.\\+18 \\($hex\\)" \
87 "bgt .+18"
88gdb_test "x" "ble\t.\\+18 \\($hex\\)" \
89 "ble .+18"
90gdb_test "x" "bra\t.\\+4660 \\($hex\\)" \
91 "bra .+4660"
92gdb_test "x" "brn\t.\\+4660 \\($hex\\)" \
93 "brn .+4660"
94gdb_test "x" "bhi\t.\\+4660 \\($hex\\)" \
95 "bhi .+4660"
96gdb_test "x" "bls\t.\\+4660 \\($hex\\)" \
97 "bls .+4660"
98gdb_test "x" "bcc\t.\\+4660 \\($hex\\)" \
99 "bcc .+4660"
100gdb_test "x" "bcs\t.\\+4660 \\($hex\\)" \
101 "bcs .+4660"
102gdb_test "x" "bne\t.\\+4660 \\($hex\\)" \
103 "bne .+4660"
104gdb_test "x" "beq\t.\\+4660 \\($hex\\)" \
105 "beq .+4660"
106gdb_test "x" "bvc\t.\\+4660 \\($hex\\)" \
107 "bvc .+4660"
108gdb_test "x" "bvs\t.\\+4660 \\($hex\\)" \
109 "bvs .+4660"
110gdb_test "x" "bpl\t.\\+4660 \\($hex\\)" \
111 "bpl .+4660"
112gdb_test "x" "bmi\t.\\+4660 \\($hex\\)" \
113 "bmi .+4660"
114gdb_test "x" "bge\t.\\+4660 \\($hex\\)" \
115 "bge .+4660"
116gdb_test "x" "blt\t.\\+4660 \\($hex\\)" \
117 "blt .+4660"
118gdb_test "x" "bgt\t.\\+4660 \\($hex\\)" \
119 "bgt .+4660"
120gdb_test "x" "ble\t.\\+4660 \\($hex\\)" \
121 "ble .+4660"
122gdb_test "x" "bra/s\t.\\+18 \\($hex\\)" \
123 "bra/s .+18"
124gdb_test "x" "nop\[ \t\]*" \
125 "nop"
126gdb_test "x" "bra/bc\t#0x7,@er2,.\\+18 \\($hex\\)" \
127 "bra/bc #0x7,@er2,.+18"
128gdb_test "x" "bra/bc\t#0x7,@0x9a(:8|),.\\+18 \\($hex\\)" \
129 "bra/bc #0x7,@0x9a:8,.+18"
130gdb_test "x" "bra/bc\t#0x7,@0x1234(:16|),.\\+18 \\($hex\\)" \
131 "bra/bc #0x7,@0x1234:16,.+18"
132gdb_test "x" "bra/bc\t#0x7,@0x12345678(:32|),.\\+18 \\($hex\\)" \
133 "bra/bc #0x7,@0x12345678:32,.+18"
134gdb_test "x" "bra/bc\t#0x7,@er2,.\\+4660 \\($hex\\)" \
135 "bra/bc #0x7,@er2,.+4660"
136gdb_test "x" "bra/bc\t#0x7,@0x12(:8|),.\\+4660 \\($hex\\)" \
137 "bra/bc #0x7,@0x12:8,.+4660"
138gdb_test "x" "bra/bc\t#0x7,@0x9abc(:16|),.\\+4660 \\($hex\\)" \
139 "bra/bc #0x7,@0x9abc:16,.+4660"
140gdb_test "x" "bra/bc\t#0x7,@0x12345678(:32|),.\\+4660 \\($hex\\)" \
141 "bra/bc #0x7,@0x12345678:32,.+4660"
142gdb_test "x" "bra/bs\t#0x7,@er2,.\\+18 \\($hex\\)" \
143 "bra/bs #0x7,@er2,.+18"
144gdb_test "x" "bra/bs\t#0x7,@0x9a(:8|),.\\+18 \\($hex\\)" \
145 "bra/bs #0x7,@0x9a:8,.+18"
146gdb_test "x" "bra/bs\t#0x7,@0x1234(:16|),.\\+18 \\($hex\\)" \
147 "bra/bs #0x7,@0x1234:16,.+18"
148gdb_test "x" "bra/bs\t#0x7,@0x12345678(:32|),.\\+18 \\($hex\\)" \
149 "bra/bs #0x7,@0x12345678:32,.+18"
150gdb_test "x" "bra/bs\t#0x7,@er2,.\\+4660 \\($hex\\)" \
151 "bra/bs #0x7,@er2,.+4660"
152gdb_test "x" "bra/bs\t#0x7,@0x12(:8|),.\\+4660 \\($hex\\)" \
153 "bra/bs #0x7,@0x12:8,.+4660"
154gdb_test "x" "bra/bs\t#0x7,@0x9abc(:16|),.\\+4660 \\($hex\\)" \
155 "bra/bs #0x7,@0x9abc:16,.+4660"
156gdb_test "x" "bra/bs\t#0x7,@0x12345678(:32|),.\\+4660 \\($hex\\)" \
157 "bra/bs #0x7,@0x12345678:32,.+4660"
158gdb_test "x" "bsr/bc\t#0x7,@er2,.\\+4660 \\($hex\\)" \
159 "bsr/bc #0x7,@er2,.+4660"
160gdb_test "x" "bsr/bc\t#0x7,@0x12(:8|),.\\+4660 \\($hex\\)" \
161 "bsr/bc #0x7,@0x12:8,.+4660"
162gdb_test "x" "bsr/bc\t#0x7,@0x9abc(:16|),.\\+4660 \\($hex\\)" \
163 "bsr/bc #0x7,@0x9abc:16,.+4660"
164gdb_test "x" "bsr/bc\t#0x7,@0x12345678(:32|),.\\+4660 \\($hex\\)" \
165 "bsr/bc #0x7,@0x12345678:32,.+4660"
166gdb_test "x" "bsr/bs\t#0x7,@er2,.\\+4660 \\($hex\\)" \
167 "bsr/bs #0x7,@er2,.+4660"
168gdb_test "x" "bsr/bs\t#0x7,@0x12(:8|),.\\+4660 \\($hex\\)" \
169 "bsr/bs #0x7,@0x12:8,.+4660"
170gdb_test "x" "bsr/bs\t#0x7,@0x9abc(:16|),.\\+4660 \\($hex\\)" \
171 "bsr/bs #0x7,@0x9abc:16,.+4660"
172gdb_test "x" "bsr/bs\t#0x7,@0x12345678(:32|),.\\+4660 \\($hex\\)" \
173 "bsr/bs #0x7,@0x12345678:32,.+4660"
174gdb_test "x" "bra\tr2l.b" \
175 "bra r2l.b"
176gdb_test "x" "bra\tr2.w" \
177 "bra r2.w"
178gdb_test "x" "bra\ter2(.l|)" \
179 "bra er2.l"
180gdb_test "x" "bsr\t.\\+18 \\($hex\\)" \
181 "bsr .+18"
182gdb_test "x" "bsr\t.\\+4660 \\($hex\\)" \
183 "bsr .+4660"
184gdb_test "x" "bsr\tr2l.b" \
185 "bsr r2l.b"
186gdb_test "x" "bsr\tr2.w" \
187 "bsr r2.w"
188gdb_test "x" "bsr\ter2(.l|)" \
189 "bsr er2.l"
190gdb_test "x" "jmp\t@er2" \
191 "jmp @er2"
192gdb_test "x" "jmp\t@0x123456(:24|)" \
193 "jmp @0x123456:24"
194gdb_test "x" "jmp\t@0x12345678(:32|)" \
195 "jmp @0x12345678:32"
196gdb_test "x" "jmp\t@@18 \\(0x12\\)" \
197 "jmp @@18 (0x12)"
198gdb_test "x" "jmp\t@@564 \\(0x234\\)" \
199 "jmp @@564 (0x234)"
200gdb_test "x" "jsr\t@er2" \
201 "jsr @er2"
202gdb_test "x" "jsr\t@0x123456(:24|)" \
203 "jsr @0x123456:24"
204gdb_test "x" "jsr\t@0x12345678(:32|)" \
205 "jsr @0x12345678:32"
206gdb_test "x" "jsr\t@@18 \\(0x12\\)" \
207 "jsr @@18 (0x12)"
208gdb_test "x" "jsr\t@@564 \\(0x234\\)" \
209 "jsr @@564 (0x234)"
210gdb_test "x" "rts\[ \t\]*" \
211 "rts"
212gdb_test "x" "rts/l\ter3" \
213 "rts/l er3"
214gdb_test "x" "rts/l\ter1-er2" \
215 "rts/l er1-er2"
216gdb_test "x" "rts/l\ter2-er4" \
217 "rts/l er2-er4"
218gdb_test "x" "rts/l\ter3-er6" \
219 "rts/l er3-er6"
220gdb_test "x" "trapa\t#0x3" \
221 "trapa #0x3"
222gdb_test "x" "rte\[ \t\]*" \
223 "rte"
224gdb_test "x" "rte/l\ter3" \
225 "rte/l er3"
226gdb_test "x" "rte/l\ter1-er2" \
227 "rte/l er1-er2"
228gdb_test "x" "rte/l\ter2-er4" \
229 "rte/l er2-er4"
230gdb_test "x" "rte/l\ter3-er6" \
231 "rte/l er3-er6"
232gdb_test "x" "ldc(.b|)\t#0x12(:8|),ccr" \
233 "ldc.b #0x12:8,ccr"
234gdb_test "x" "ldc(.b|)\tr3h,ccr" \
235 "ldc.b r3h,ccr"
236gdb_test "x" "ldc(.w|)\t@er3,ccr" \
237 "ldc.w @er3,ccr"
238gdb_test "x" "ldc(.w|)\t@er3\\+,ccr" \
239 "ldc.w @er3+,ccr"
240gdb_test "x" "ldc(.w|)\t@\\(0x1234(:16|),er3\\),ccr" \
241 "ldc.w @(0x1234:16,er3),ccr"
242gdb_test "x" "ldc(.w|)\t@\\(0x12345678(:32|),er3\\),ccr" \
243 "ldc.w @(0x12345678:32,er3),ccr"
244gdb_test "x" "ldc(.w|)\t@0x1234(:16|),ccr" \
245 "ldc.w @0x1234:16,ccr"
246gdb_test "x" "ldc(.w|)\t@0x12345678(:32|),ccr" \
247 "ldc.w @0x12345678:32,ccr"
248gdb_test "x" "ldc(.b|)\t#0x12(:8|),exr" \
249 "ldc.b #0x12:8,exr"
250gdb_test "x" "ldc(.b|)\tr3h,exr" \
251 "ldc.b r3h,exr"
252gdb_test "x" "ldc(.w|)\t@er3,exr" \
253 "ldc.w @er3,exr"
254gdb_test "x" "ldc(.w|)\t@er3\\+,exr" \
255 "ldc.w @er3+,exr"
256gdb_test "x" "ldc(.w|)\t@\\(0x1234(:16|),er3\\),exr" \
257 "ldc.w @(0x1234:16,er3),exr"
258gdb_test "x" "ldc(.w|)\t@\\(0x12345678(:32|),er3\\),exr" \
259 "ldc.w @(0x12345678:32,er3),exr"
260gdb_test "x" "ldc(.w|)\t@0x1234(:16|),exr" \
261 "ldc.w @0x1234:16,exr"
262gdb_test "x" "ldc(.w|)\t@0x12345678(:32|),exr" \
263 "ldc.w @0x12345678:32,exr"
264gdb_test "x" "stc(.b|)\tccr,r1h" \
265 "stc.b ccr,r1h"
266gdb_test "x" "stc(.w|)\tccr,@er1" \
267 "stc.w ccr,@er1"
268gdb_test "x" "stc(.w|)\tccr,@-er1" \
269 "stc.w ccr,@-er1"
270gdb_test "x" "stc(.w|)\tccr,@\\(0x1234(:16|),er1\\)" \
271 "stc.w ccr,@(0x1234:16,er1)"
272gdb_test "x" "stc(.w|)\tccr,@\\(0x12345678(:32|),er1\\)" \
273 "stc.w ccr,@(0x12345678:32,er1)"
274gdb_test "x" "stc(.w|)\tccr,@0x1234(:16|)" \
275 "stc.w ccr,@0x1234:16"
276gdb_test "x" "stc(.w|)\tccr,@0x12345678(:32|)" \
277 "stc.w ccr,@0x12345678:32"
278gdb_test "x" "stc(.b|)\texr,r1h" \
279 "stc.b exr,r1h"
280gdb_test "x" "stc(.w|)\texr,@er1" \
281 "stc.w exr,@er1"
282gdb_test "x" "stc(.w|)\texr,@-er1" \
283 "stc.w exr,@-er1"
284gdb_test "x" "stc(.w|)\texr,@\\(0x1234(:16|),er1\\)" \
285 "stc.w exr,@(0x1234:16,er1)"
286gdb_test "x" "stc(.w|)\texr,@\\(0x12345678(:32|),er1\\)" \
287 "stc.w exr,@(0x12345678:32,er1)"
288gdb_test "x" "stc(.w|)\texr,@0x1234(:16|)" \
289 "stc.w exr,@0x1234:16"
290gdb_test "x" "stc(.w|)\texr,@0x12345678(:32|)" \
291 "stc.w exr,@0x12345678:32"
292gdb_test "x" "orc(.b|)\t#0x12(:8|),ccr" \
293 "orc.b #0x12:8,ccr"
294gdb_test "x" "orc(.b|)\t#0x12(:8|),exr" \
295 "orc.b #0x12:8,exr"
296gdb_test "x" "xorc(.b|)\t#0x12(:8|),ccr" \
297 "xorc.b #0x12:8,ccr"
298gdb_test "x" "xorc(.b|)\t#0x12(:8|),exr" \
299 "xorc.b #0x12:8,exr"
300gdb_test "x" "andc(.b|)\t#0x12(:8|),ccr" \
301 "andc.b #0x12:8,ccr"
302gdb_test "x" "andc(.b|)\t#0x12(:8|),exr" \
303 "andc.b #0x12:8,exr"
304gdb_test "x" "sleep\[ \t\]*" \
305 "sleep"
306gdb_test "x" "nop\[ \t\]*" \
307 "nop"
This page took 0.398961 seconds and 4 git commands to generate.