]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.disasm/t12_bit.exp
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.disasm / t12_bit.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
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 Michael Snyder (msnyder@redhat.com)
21
22if $tracelevel then {
23 strace $tracelevel
24}
25
26if ![istarget "h8300*-*-*"] {
27 verbose "Tests ignored for all but h8300s based targets."
28 return
29}
30
31set prms_id 0
32set bug_id 0
33
34set testfile "t12_bit"
35set srcfile ${srcdir}/${subdir}/${testfile}.s
36set objfile ${objdir}/${subdir}/${testfile}.o
37set binfile ${objdir}/${subdir}/${testfile}.x
38
39set asm-flags "";
40set link-flags "-m h8300sxelf";
41
42
43if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
b60f0898
JB
44 untested t12_bit.exp
45 return -1
57ba3b85
MS
46}
47
48if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
b60f0898
JB
49 untested t12_bit.exp
50 return -1
57ba3b85
MS
51}
52
53gdb_start
54gdb_reinitialize_dir $srcdir/$subdir
55gdb_load $binfile
56
57gdb_test "x /i _start" "bset\t#0x7,r1h" \
58 "bset #0x7,r1h"
59gdb_test "x" "bset\t#0x7,@er1" \
60 "bset #0x7,@er1"
61gdb_test "x" "bset\t#0x7,@0x12(:8|)" \
62 "bset #0x7,@0x12:8"
63gdb_test "x" "bset\t#0x7,@0x1234(:16|)" \
64 "bset #0x7,@0x1234:16"
65gdb_test "x" "bset\t#0x7,@0x12345678(:32|)" \
66 "bset #0x7,@0x12345678:32"
67gdb_test "x" "bset\tr3h,r1h" \
68 "bset r3h,r1h"
69gdb_test "x" "bset\tr3h,@er1" \
70 "bset r3h,@er1"
71gdb_test "x" "bset\tr3h,@0x12(:8|)" \
72 "bset r3h,@0x12:8"
73gdb_test "x" "bset\tr3h,@0x1234(:16|)" \
74 "bset r3h,@0x1234:16"
75gdb_test "x" "bset\tr3h,@0x12345678(:32|)" \
76 "bset r3h,@0x12345678:32"
77gdb_test "x" "bset/eq\t#0x7,@er1" \
78 "bset/eq #0x7,@er1"
79gdb_test "x" "bset/eq\t#0x7,@0x12(:8|)" \
80 "bset/eq #0x7,@0x12:8"
81gdb_test "x" "bset/eq\t#0x7,@0x1234(:16|)" \
82 "bset/eq #0x7,@0x1234:16"
83gdb_test "x" "bset/eq\t#0x7,@0x12345678(:32|)" \
84 "bset/eq #0x7,@0x12345678:32"
85gdb_test "x" "bset/eq\tr3h,@er1" \
86 "bset/eq r3h,@er1"
87gdb_test "x" "bset/eq\tr3h,@0x12(:8|)" \
88 "bset/eq r3h,@0x12:8"
89gdb_test "x" "bset/eq\tr3h,@0x1234(:16|)" \
90 "bset/eq r3h,@0x1234:16"
91gdb_test "x" "bset/eq\tr3h,@0x12345678(:32|)" \
92 "bset/eq r3h,@0x12345678:32"
93gdb_test "x" "bset/ne\t#0x7,@er1" \
94 "bset/ne #0x7,@er1"
95gdb_test "x" "bset/ne\t#0x7,@0x12(:8|)" \
96 "bset/ne #0x7,@0x12:8"
97gdb_test "x" "bset/ne\t#0x7,@0x1234(:16|)" \
98 "bset/ne #0x7,@0x1234:16"
99gdb_test "x" "bset/ne\t#0x7,@0x12345678(:32|)" \
100 "bset/ne #0x7,@0x12345678:32"
101gdb_test "x" "bset/ne\tr3h,@er1" \
102 "bset/ne r3h,@er1"
103gdb_test "x" "bset/ne\tr3h,@0x12(:8|)" \
104 "bset/ne r3h,@0x12:8"
105gdb_test "x" "bset/ne\tr3h,@0x1234(:16|)" \
106 "bset/ne r3h,@0x1234:16"
107gdb_test "x" "bset/ne\tr3h,@0x12345678(:32|)" \
108 "bset/ne r3h,@0x12345678:32"
109gdb_test "x" "bnot\t#0x7,r1h" \
110 "bnot #0x7,r1h"
111gdb_test "x" "bnot\t#0x7,@er1" \
112 "bnot #0x7,@er1"
113gdb_test "x" "bnot\t#0x7,@0x12(:8|)" \
114 "bnot #0x7,@0x12:8"
115gdb_test "x" "bnot\t#0x7,@0x1234(:16|)" \
116 "bnot #0x7,@0x1234:16"
117gdb_test "x" "bnot\t#0x7,@0x12345678(:32|)" \
118 "bnot #0x7,@0x12345678:32"
119gdb_test "x" "bnot\tr3h,r1h" \
120 "bnot r3h,r1h"
121gdb_test "x" "bnot\tr3h,@er1" \
122 "bnot r3h,@er1"
123gdb_test "x" "bnot\tr3h,@0x12(:8|)" \
124 "bnot r3h,@0x12:8"
125gdb_test "x" "bnot\tr3h,@0x1234(:16|)" \
126 "bnot r3h,@0x1234:16"
127gdb_test "x" "bnot\tr3h,@0x12345678(:32|)" \
128 "bnot r3h,@0x12345678:32"
129gdb_test "x" "bclr\t#0x7,r1h" \
130 "bclr #0x7,r1h"
131gdb_test "x" "bclr\t#0x7,@er1" \
132 "bclr #0x7,@er1"
133gdb_test "x" "bclr\t#0x7,@0x12(:8|)" \
134 "bclr #0x7,@0x12:8"
135gdb_test "x" "bclr\t#0x7,@0x1234(:16|)" \
136 "bclr #0x7,@0x1234:16"
137gdb_test "x" "bclr\t#0x7,@0x12345678(:32|)" \
138 "bclr #0x7,@0x12345678:32"
139gdb_test "x" "bclr\tr3h,r1h" \
140 "bclr r3h,r1h"
141gdb_test "x" "bclr\tr3h,@er1" \
142 "bclr r3h,@er1"
143gdb_test "x" "bclr\tr3h,@0x12(:8|)" \
144 "bclr r3h,@0x12:8"
145gdb_test "x" "bclr\tr3h,@0x1234(:16|)" \
146 "bclr r3h,@0x1234:16"
147gdb_test "x" "bclr\tr3h,@0x12345678(:32|)" \
148 "bclr r3h,@0x12345678:32"
149gdb_test "x" "bclr/eq\t#0x7,@er1" \
150 "bclr/eq #0x7,@er1"
151gdb_test "x" "bclr/eq\t#0x7,@0x12(:8|)" \
152 "bclr/eq #0x7,@0x12:8"
153gdb_test "x" "bclr/eq\t#0x7,@0x1234(:16|)" \
154 "bclr/eq #0x7,@0x1234:16"
155gdb_test "x" "bclr/eq\t#0x7,@0x12345678(:32|)" \
156 "bclr/eq #0x7,@0x12345678:32"
157gdb_test "x" "bclr/eq\tr3h,@er1" \
158 "bclr/eq r3h,@er1"
159gdb_test "x" "bclr/eq\tr3h,@0x12(:8|)" \
160 "bclr/eq r3h,@0x12:8"
161gdb_test "x" "bclr/eq\tr3h,@0x1234(:16|)" \
162 "bclr/eq r3h,@0x1234:16"
163gdb_test "x" "bclr/eq\tr3h,@0x12345678(:32|)" \
164 "bclr/eq r3h,@0x12345678:32"
165gdb_test "x" "bclr/ne\t#0x7,@er1" \
166 "bclr/ne #0x7,@er1"
167gdb_test "x" "bclr/ne\t#0x7,@0x12(:8|)" \
168 "bclr/ne #0x7,@0x12:8"
169gdb_test "x" "bclr/ne\t#0x7,@0x1234(:16|)" \
170 "bclr/ne #0x7,@0x1234:16"
171gdb_test "x" "bclr/ne\t#0x7,@0x12345678(:32|)" \
172 "bclr/ne #0x7,@0x12345678:32"
173gdb_test "x" "bclr/ne\tr3h,@er1" \
174 "bclr/ne r3h,@er1"
175gdb_test "x" "bclr/ne\tr3h,@0x12(:8|)" \
176 "bclr/ne r3h,@0x12:8"
177gdb_test "x" "bclr/ne\tr3h,@0x1234(:16|)" \
178 "bclr/ne r3h,@0x1234:16"
179gdb_test "x" "bclr/ne\tr3h,@0x12345678(:32|)" \
180 "bclr/ne r3h,@0x12345678:32"
181gdb_test "x" "btst\t#0x7,r1h" \
182 "btst #0x7,r1h"
183gdb_test "x" "btst\t#0x7,@er1" \
184 "btst #0x7,@er1"
185gdb_test "x" "btst\t#0x7,@0x12(:8|)" \
186 "btst #0x7,@0x12:8"
187gdb_test "x" "btst\t#0x7,@0x1234(:16|)" \
188 "btst #0x7,@0x1234:16"
189gdb_test "x" "btst\t#0x7,@0x12345678(:32|)" \
190 "btst #0x7,@0x12345678:32"
191gdb_test "x" "btst\tr3h,r1h" \
192 "btst r3h,r1h"
193gdb_test "x" "btst\tr3h,@er1" \
194 "btst r3h,@er1"
195gdb_test "x" "btst\tr3h,@0x12(:8|)" \
196 "btst r3h,@0x12:8"
197gdb_test "x" "btst\tr3h,@0x1234(:16|)" \
198 "btst r3h,@0x1234:16"
199gdb_test "x" "btst\tr3h,@0x12345678(:32|)" \
200 "btst r3h,@0x12345678:32"
201gdb_test "x" "bor\t#0x7,r1h" \
202 "bor #0x7,r1h"
203gdb_test "x" "bor\t#0x7,@er1" \
204 "bor #0x7,@er1"
205gdb_test "x" "bor\t#0x7,@0x12(:8|)" \
206 "bor #0x7,@0x12:8"
207gdb_test "x" "bor\t#0x7,@0x1234(:16|)" \
208 "bor #0x7,@0x1234:16"
209gdb_test "x" "bor\t#0x7,@0x12345678(:32|)" \
210 "bor #0x7,@0x12345678:32"
211gdb_test "x" "bior\t#0x7,r1h" \
212 "bior #0x7,r1h"
213gdb_test "x" "bior\t#0x7,@er1" \
214 "bior #0x7,@er1"
215gdb_test "x" "bior\t#0x7,@0x12(:8|)" \
216 "bior #0x7,@0x12:8"
217gdb_test "x" "bior\t#0x7,@0x1234(:16|)" \
218 "bior #0x7,@0x1234:16"
219gdb_test "x" "bior\t#0x7,@0x12345678(:32|)" \
220 "bior #0x7,@0x12345678:32"
221gdb_test "x" "bxor\t#0x7,r1h" \
222 "bxor #0x7,r1h"
223gdb_test "x" "bxor\t#0x7,@er1" \
224 "bxor #0x7,@er1"
225gdb_test "x" "bxor\t#0x7,@0x12(:8|)" \
226 "bxor #0x7,@0x12:8"
227gdb_test "x" "bxor\t#0x7,@0x1234(:16|)" \
228 "bxor #0x7,@0x1234:16"
229gdb_test "x" "bxor\t#0x7,@0x12345678(:32|)" \
230 "bxor #0x7,@0x12345678:32"
231gdb_test "x" "bixor\t#0x7,r1h" \
232 "bixor #0x7,r1h"
233gdb_test "x" "bixor\t#0x7,@er1" \
234 "bixor #0x7,@er1"
235gdb_test "x" "bixor\t#0x7,@0x12(:8|)" \
236 "bixor #0x7,@0x12:8"
237gdb_test "x" "bixor\t#0x7,@0x1234(:16|)" \
238 "bixor #0x7,@0x1234:16"
239gdb_test "x" "bixor\t#0x7,@0x12345678(:32|)" \
240 "bixor #0x7,@0x12345678:32"
241gdb_test "x" "band\t#0x7,r1h" \
242 "band #0x7,r1h"
243gdb_test "x" "band\t#0x7,@er1" \
244 "band #0x7,@er1"
245gdb_test "x" "band\t#0x7,@0x12(:8|)" \
246 "band #0x7,@0x12:8"
247gdb_test "x" "band\t#0x7,@0x1234(:16|)" \
248 "band #0x7,@0x1234:16"
249gdb_test "x" "band\t#0x7,@0x12345678(:32|)" \
250 "band #0x7,@0x12345678:32"
251gdb_test "x" "biand\t#0x7,r1h" \
252 "biand #0x7,r1h"
253gdb_test "x" "biand\t#0x7,@er1" \
254 "biand #0x7,@er1"
255gdb_test "x" "biand\t#0x7,@0x12(:8|)" \
256 "biand #0x7,@0x12:8"
257gdb_test "x" "biand\t#0x7,@0x1234(:16|)" \
258 "biand #0x7,@0x1234:16"
259gdb_test "x" "biand\t#0x7,@0x12345678(:32|)" \
260 "biand #0x7,@0x12345678:32"
261gdb_test "x" "bld\t#0x7,r1h" \
262 "bld #0x7,r1h"
263gdb_test "x" "bld\t#0x7,@er1" \
264 "bld #0x7,@er1"
265gdb_test "x" "bld\t#0x7,@0x12(:8|)" \
266 "bld #0x7,@0x12:8"
267gdb_test "x" "bld\t#0x7,@0x1234(:16|)" \
268 "bld #0x7,@0x1234:16"
269gdb_test "x" "bld\t#0x7,@0x12345678(:32|)" \
270 "bld #0x7,@0x12345678:32"
271gdb_test "x" "bild\t#0x7,r1h" \
272 "bild #0x7,r1h"
273gdb_test "x" "bild\t#0x7,@er1" \
274 "bild #0x7,@er1"
275gdb_test "x" "bild\t#0x7,@0x12(:8|)" \
276 "bild #0x7,@0x12:8"
277gdb_test "x" "bild\t#0x7,@0x1234(:16|)" \
278 "bild #0x7,@0x1234:16"
279gdb_test "x" "bild\t#0x7,@0x12345678(:32|)" \
280 "bild #0x7,@0x12345678:32"
281gdb_test "x" "bst\t#0x7,r1h" \
282 "bst #0x7,r1h"
283gdb_test "x" "bst\t#0x7,@er1" \
284 "bst #0x7,@er1"
285gdb_test "x" "bst\t#0x7,@0x12(:8|)" \
286 "bst #0x7,@0x12:8"
287gdb_test "x" "bst\t#0x7,@0x1234(:16|)" \
288 "bst #0x7,@0x1234:16"
289gdb_test "x" "bst\t#0x7,@0x12345678(:32|)" \
290 "bst #0x7,@0x12345678:32"
291gdb_test "x" "bstz\t#0x7,@er1" \
292 "bstz #0x7,@er1"
293gdb_test "x" "bstz\t#0x7,@0x12(:8|)" \
294 "bstz #0x7,@0x12:8"
295gdb_test "x" "bstz\t#0x7,@0x1234(:16|)" \
296 "bstz #0x7,@0x1234:16"
297gdb_test "x" "bstz\t#0x7,@0x12345678(:32|)" \
298 "bstz #0x7,@0x12345678:32"
299gdb_test "x" "bist\t#0x7,r1h" \
300 "bist #0x7,r1h"
301gdb_test "x" "bist\t#0x7,@er1" \
302 "bist #0x7,@er1"
303gdb_test "x" "bist\t#0x7,@0x12(:8|)" \
304 "bist #0x7,@0x12:8"
305gdb_test "x" "bist\t#0x7,@0x1234(:16|)" \
306 "bist #0x7,@0x1234:16"
307gdb_test "x" "bist\t#0x7,@0x12345678(:32|)" \
308 "bist #0x7,@0x12345678:32"
309gdb_test "x" "bistz\t#0x7,@er1" \
310 "bistz #0x7,@er1"
311gdb_test "x" "bistz\t#0x7,@0x12(:8|)" \
312 "bistz #0x7,@0x12:8"
313gdb_test "x" "bistz\t#0x7,@0x1234(:16|)" \
314 "bistz #0x7,@0x1234:16"
315gdb_test "x" "bistz\t#0x7,@0x12345678(:32|)" \
316 "bistz #0x7,@0x12345678:32"
317gdb_test "x" "bfld\t#0x34(:8|),@er1,r3h" \
318 "bfld #0x34:8,@er1,r3h"
319gdb_test "x" "bfld\t#0x34(:8|),@0x12(:8|),r3h" \
320 "bfld #0x34:8,@0x12:8,r3h"
321gdb_test "x" "bfld\t#0x34(:8|),@0x1234(:16|),r3h" \
322 "bfld #0x34:8,@0x1234:16,r3h"
323gdb_test "x" "bfld\t#0x34(:8|),@0x12345678(:32|),r3h" \
324 "bfld #0x34:8,@0x12345678:32,r3h"
325gdb_test "x" "bfst\tr3h,#0x34(:8|),@er1" \
326 "bfst r3h,#0x34:8,@er1"
327gdb_test "x" "bfst\tr3h,#0x34(:8|),@0x12(:8|)" \
328 "bfst r3h,#0x34:8,@0x12:8"
329gdb_test "x" "bfst\tr3h,#0x34(:8|),@0x1234(:16|)" \
330 "bfst r3h,#0x34:8,@0x1234:16"
331gdb_test "x" "bfst\tr3h,#0x34(:8|),@0x12345678(:32|)" \
332 "bfst r3h,#0x34:8,@0x12345678:32"