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
"t12_bit"
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" "bset\t#0x7,r1h" \
57 gdb_test
"x" "bset\t#0x7,@er1" \
59 gdb_test
"x" "bset\t#0x7,@0x12(:8|)" \
61 gdb_test
"x" "bset\t#0x7,@0x1234(:16|)" \
62 "bset #0x7,@0x1234:16"
63 gdb_test
"x" "bset\t#0x7,@0x12345678(:32|)" \
64 "bset #0x7,@0x12345678:32"
65 gdb_test
"x" "bset\tr3h,r1h" \
67 gdb_test
"x" "bset\tr3h,@er1" \
69 gdb_test
"x" "bset\tr3h,@0x12(:8|)" \
71 gdb_test
"x" "bset\tr3h,@0x1234(:16|)" \
73 gdb_test
"x" "bset\tr3h,@0x12345678(:32|)" \
74 "bset r3h,@0x12345678:32"
75 gdb_test
"x" "bset/eq\t#0x7,@er1" \
77 gdb_test
"x" "bset/eq\t#0x7,@0x12(:8|)" \
78 "bset/eq #0x7,@0x12:8"
79 gdb_test
"x" "bset/eq\t#0x7,@0x1234(:16|)" \
80 "bset/eq #0x7,@0x1234:16"
81 gdb_test
"x" "bset/eq\t#0x7,@0x12345678(:32|)" \
82 "bset/eq #0x7,@0x12345678:32"
83 gdb_test
"x" "bset/eq\tr3h,@er1" \
85 gdb_test
"x" "bset/eq\tr3h,@0x12(:8|)" \
87 gdb_test
"x" "bset/eq\tr3h,@0x1234(:16|)" \
88 "bset/eq r3h,@0x1234:16"
89 gdb_test
"x" "bset/eq\tr3h,@0x12345678(:32|)" \
90 "bset/eq r3h,@0x12345678:32"
91 gdb_test
"x" "bset/ne\t#0x7,@er1" \
93 gdb_test
"x" "bset/ne\t#0x7,@0x12(:8|)" \
94 "bset/ne #0x7,@0x12:8"
95 gdb_test
"x" "bset/ne\t#0x7,@0x1234(:16|)" \
96 "bset/ne #0x7,@0x1234:16"
97 gdb_test
"x" "bset/ne\t#0x7,@0x12345678(:32|)" \
98 "bset/ne #0x7,@0x12345678:32"
99 gdb_test
"x" "bset/ne\tr3h,@er1" \
101 gdb_test
"x" "bset/ne\tr3h,@0x12(:8|)" \
102 "bset/ne r3h,@0x12:8"
103 gdb_test
"x" "bset/ne\tr3h,@0x1234(:16|)" \
104 "bset/ne r3h,@0x1234:16"
105 gdb_test
"x" "bset/ne\tr3h,@0x12345678(:32|)" \
106 "bset/ne r3h,@0x12345678:32"
107 gdb_test
"x" "bnot\t#0x7,r1h" \
109 gdb_test
"x" "bnot\t#0x7,@er1" \
111 gdb_test
"x" "bnot\t#0x7,@0x12(:8|)" \
113 gdb_test
"x" "bnot\t#0x7,@0x1234(:16|)" \
114 "bnot #0x7,@0x1234:16"
115 gdb_test
"x" "bnot\t#0x7,@0x12345678(:32|)" \
116 "bnot #0x7,@0x12345678:32"
117 gdb_test
"x" "bnot\tr3h,r1h" \
119 gdb_test
"x" "bnot\tr3h,@er1" \
121 gdb_test
"x" "bnot\tr3h,@0x12(:8|)" \
123 gdb_test
"x" "bnot\tr3h,@0x1234(:16|)" \
124 "bnot r3h,@0x1234:16"
125 gdb_test
"x" "bnot\tr3h,@0x12345678(:32|)" \
126 "bnot r3h,@0x12345678:32"
127 gdb_test
"x" "bclr\t#0x7,r1h" \
129 gdb_test
"x" "bclr\t#0x7,@er1" \
131 gdb_test
"x" "bclr\t#0x7,@0x12(:8|)" \
133 gdb_test
"x" "bclr\t#0x7,@0x1234(:16|)" \
134 "bclr #0x7,@0x1234:16"
135 gdb_test
"x" "bclr\t#0x7,@0x12345678(:32|)" \
136 "bclr #0x7,@0x12345678:32"
137 gdb_test
"x" "bclr\tr3h,r1h" \
139 gdb_test
"x" "bclr\tr3h,@er1" \
141 gdb_test
"x" "bclr\tr3h,@0x12(:8|)" \
143 gdb_test
"x" "bclr\tr3h,@0x1234(:16|)" \
144 "bclr r3h,@0x1234:16"
145 gdb_test
"x" "bclr\tr3h,@0x12345678(:32|)" \
146 "bclr r3h,@0x12345678:32"
147 gdb_test
"x" "bclr/eq\t#0x7,@er1" \
149 gdb_test
"x" "bclr/eq\t#0x7,@0x12(:8|)" \
150 "bclr/eq #0x7,@0x12:8"
151 gdb_test
"x" "bclr/eq\t#0x7,@0x1234(:16|)" \
152 "bclr/eq #0x7,@0x1234:16"
153 gdb_test
"x" "bclr/eq\t#0x7,@0x12345678(:32|)" \
154 "bclr/eq #0x7,@0x12345678:32"
155 gdb_test
"x" "bclr/eq\tr3h,@er1" \
157 gdb_test
"x" "bclr/eq\tr3h,@0x12(:8|)" \
158 "bclr/eq r3h,@0x12:8"
159 gdb_test
"x" "bclr/eq\tr3h,@0x1234(:16|)" \
160 "bclr/eq r3h,@0x1234:16"
161 gdb_test
"x" "bclr/eq\tr3h,@0x12345678(:32|)" \
162 "bclr/eq r3h,@0x12345678:32"
163 gdb_test
"x" "bclr/ne\t#0x7,@er1" \
165 gdb_test
"x" "bclr/ne\t#0x7,@0x12(:8|)" \
166 "bclr/ne #0x7,@0x12:8"
167 gdb_test
"x" "bclr/ne\t#0x7,@0x1234(:16|)" \
168 "bclr/ne #0x7,@0x1234:16"
169 gdb_test
"x" "bclr/ne\t#0x7,@0x12345678(:32|)" \
170 "bclr/ne #0x7,@0x12345678:32"
171 gdb_test
"x" "bclr/ne\tr3h,@er1" \
173 gdb_test
"x" "bclr/ne\tr3h,@0x12(:8|)" \
174 "bclr/ne r3h,@0x12:8"
175 gdb_test
"x" "bclr/ne\tr3h,@0x1234(:16|)" \
176 "bclr/ne r3h,@0x1234:16"
177 gdb_test
"x" "bclr/ne\tr3h,@0x12345678(:32|)" \
178 "bclr/ne r3h,@0x12345678:32"
179 gdb_test
"x" "btst\t#0x7,r1h" \
181 gdb_test
"x" "btst\t#0x7,@er1" \
183 gdb_test
"x" "btst\t#0x7,@0x12(:8|)" \
185 gdb_test
"x" "btst\t#0x7,@0x1234(:16|)" \
186 "btst #0x7,@0x1234:16"
187 gdb_test
"x" "btst\t#0x7,@0x12345678(:32|)" \
188 "btst #0x7,@0x12345678:32"
189 gdb_test
"x" "btst\tr3h,r1h" \
191 gdb_test
"x" "btst\tr3h,@er1" \
193 gdb_test
"x" "btst\tr3h,@0x12(:8|)" \
195 gdb_test
"x" "btst\tr3h,@0x1234(:16|)" \
196 "btst r3h,@0x1234:16"
197 gdb_test
"x" "btst\tr3h,@0x12345678(:32|)" \
198 "btst r3h,@0x12345678:32"
199 gdb_test
"x" "bor\t#0x7,r1h" \
201 gdb_test
"x" "bor\t#0x7,@er1" \
203 gdb_test
"x" "bor\t#0x7,@0x12(:8|)" \
205 gdb_test
"x" "bor\t#0x7,@0x1234(:16|)" \
206 "bor #0x7,@0x1234:16"
207 gdb_test
"x" "bor\t#0x7,@0x12345678(:32|)" \
208 "bor #0x7,@0x12345678:32"
209 gdb_test
"x" "bior\t#0x7,r1h" \
211 gdb_test
"x" "bior\t#0x7,@er1" \
213 gdb_test
"x" "bior\t#0x7,@0x12(:8|)" \
215 gdb_test
"x" "bior\t#0x7,@0x1234(:16|)" \
216 "bior #0x7,@0x1234:16"
217 gdb_test
"x" "bior\t#0x7,@0x12345678(:32|)" \
218 "bior #0x7,@0x12345678:32"
219 gdb_test
"x" "bxor\t#0x7,r1h" \
221 gdb_test
"x" "bxor\t#0x7,@er1" \
223 gdb_test
"x" "bxor\t#0x7,@0x12(:8|)" \
225 gdb_test
"x" "bxor\t#0x7,@0x1234(:16|)" \
226 "bxor #0x7,@0x1234:16"
227 gdb_test
"x" "bxor\t#0x7,@0x12345678(:32|)" \
228 "bxor #0x7,@0x12345678:32"
229 gdb_test
"x" "bixor\t#0x7,r1h" \
231 gdb_test
"x" "bixor\t#0x7,@er1" \
233 gdb_test
"x" "bixor\t#0x7,@0x12(:8|)" \
235 gdb_test
"x" "bixor\t#0x7,@0x1234(:16|)" \
236 "bixor #0x7,@0x1234:16"
237 gdb_test
"x" "bixor\t#0x7,@0x12345678(:32|)" \
238 "bixor #0x7,@0x12345678:32"
239 gdb_test
"x" "band\t#0x7,r1h" \
241 gdb_test
"x" "band\t#0x7,@er1" \
243 gdb_test
"x" "band\t#0x7,@0x12(:8|)" \
245 gdb_test
"x" "band\t#0x7,@0x1234(:16|)" \
246 "band #0x7,@0x1234:16"
247 gdb_test
"x" "band\t#0x7,@0x12345678(:32|)" \
248 "band #0x7,@0x12345678:32"
249 gdb_test
"x" "biand\t#0x7,r1h" \
251 gdb_test
"x" "biand\t#0x7,@er1" \
253 gdb_test
"x" "biand\t#0x7,@0x12(:8|)" \
255 gdb_test
"x" "biand\t#0x7,@0x1234(:16|)" \
256 "biand #0x7,@0x1234:16"
257 gdb_test
"x" "biand\t#0x7,@0x12345678(:32|)" \
258 "biand #0x7,@0x12345678:32"
259 gdb_test
"x" "bld\t#0x7,r1h" \
261 gdb_test
"x" "bld\t#0x7,@er1" \
263 gdb_test
"x" "bld\t#0x7,@0x12(:8|)" \
265 gdb_test
"x" "bld\t#0x7,@0x1234(:16|)" \
266 "bld #0x7,@0x1234:16"
267 gdb_test
"x" "bld\t#0x7,@0x12345678(:32|)" \
268 "bld #0x7,@0x12345678:32"
269 gdb_test
"x" "bild\t#0x7,r1h" \
271 gdb_test
"x" "bild\t#0x7,@er1" \
273 gdb_test
"x" "bild\t#0x7,@0x12(:8|)" \
275 gdb_test
"x" "bild\t#0x7,@0x1234(:16|)" \
276 "bild #0x7,@0x1234:16"
277 gdb_test
"x" "bild\t#0x7,@0x12345678(:32|)" \
278 "bild #0x7,@0x12345678:32"
279 gdb_test
"x" "bst\t#0x7,r1h" \
281 gdb_test
"x" "bst\t#0x7,@er1" \
283 gdb_test
"x" "bst\t#0x7,@0x12(:8|)" \
285 gdb_test
"x" "bst\t#0x7,@0x1234(:16|)" \
286 "bst #0x7,@0x1234:16"
287 gdb_test
"x" "bst\t#0x7,@0x12345678(:32|)" \
288 "bst #0x7,@0x12345678:32"
289 gdb_test
"x" "bstz\t#0x7,@er1" \
291 gdb_test
"x" "bstz\t#0x7,@0x12(:8|)" \
293 gdb_test
"x" "bstz\t#0x7,@0x1234(:16|)" \
294 "bstz #0x7,@0x1234:16"
295 gdb_test
"x" "bstz\t#0x7,@0x12345678(:32|)" \
296 "bstz #0x7,@0x12345678:32"
297 gdb_test
"x" "bist\t#0x7,r1h" \
299 gdb_test
"x" "bist\t#0x7,@er1" \
301 gdb_test
"x" "bist\t#0x7,@0x12(:8|)" \
303 gdb_test
"x" "bist\t#0x7,@0x1234(:16|)" \
304 "bist #0x7,@0x1234:16"
305 gdb_test
"x" "bist\t#0x7,@0x12345678(:32|)" \
306 "bist #0x7,@0x12345678:32"
307 gdb_test
"x" "bistz\t#0x7,@er1" \
309 gdb_test
"x" "bistz\t#0x7,@0x12(:8|)" \
311 gdb_test
"x" "bistz\t#0x7,@0x1234(:16|)" \
312 "bistz #0x7,@0x1234:16"
313 gdb_test
"x" "bistz\t#0x7,@0x12345678(:32|)" \
314 "bistz #0x7,@0x12345678:32"
315 gdb_test
"x" "bfld\t#0x34(:8|),@er1,r3h" \
316 "bfld #0x34:8,@er1,r3h"
317 gdb_test
"x" "bfld\t#0x34(:8|),@0x12(:8|),r3h" \
318 "bfld #0x34:8,@0x12:8,r3h"
319 gdb_test
"x" "bfld\t#0x34(:8|),@0x1234(:16|),r3h" \
320 "bfld #0x34:8,@0x1234:16,r3h"
321 gdb_test
"x" "bfld\t#0x34(:8|),@0x12345678(:32|),r3h" \
322 "bfld #0x34:8,@0x12345678:32,r3h"
323 gdb_test
"x" "bfst\tr3h,#0x34(:8|),@er1" \
324 "bfst r3h,#0x34:8,@er1"
325 gdb_test
"x" "bfst\tr3h,#0x34(:8|),@0x12(:8|)" \
326 "bfst r3h,#0x34:8,@0x12:8"
327 gdb_test
"x" "bfst\tr3h,#0x34(:8|),@0x1234(:16|)" \
328 "bfst r3h,#0x34:8,@0x1234:16"
329 gdb_test
"x" "bfst\tr3h,#0x34(:8|),@0x12345678(:32|)" \
330 "bfst r3h,#0x34:8,@0x12345678:32"