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