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
"t06_ari2"
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" "addx(.b|)\t#0x12(:8|),r1h" \
57 gdb_test
"x" "addx(.b|)\t#0x12(:8|),@er1" \
59 gdb_test
"x" "addx(.b|)\t#0x12(:8|),@er1-" \
60 "addx.b #0x12:8,@er1-"
61 gdb_test
"x" "addx(.b|)\tr3h,r1h" \
63 gdb_test
"x" "addx(.b|)\tr3h,@er1" \
65 gdb_test
"x" "addx(.b|)\tr3h,@er1-" \
67 gdb_test
"x" "addx(.b|)\t@er3,r1h" \
69 gdb_test
"x" "addx(.b|)\t@er3,@er1" \
71 gdb_test
"x" "addx(.b|)\t@er3-,r1h" \
73 gdb_test
"x" "addx(.b|)\t@er3-,@er1-" \
75 gdb_test
"x" "addx.w\t#0x1234(:16|),r1" \
76 "addx.w #0x1234:16,r1"
77 gdb_test
"x" "addx.w\t#0x1234(:16|),@er1" \
78 "addx.w #0x1234:16,@er1"
79 gdb_test
"x" "addx.w\t#0x1234(:16|),@er1-" \
80 "addx.w #0x1234:16,@er1-"
81 gdb_test
"x" "addx.w\tr3,r1" \
83 gdb_test
"x" "addx.w\tr3,@er1" \
85 gdb_test
"x" "addx.w\tr3,@er1-" \
87 gdb_test
"x" "addx.w\t@er3,r1" \
89 gdb_test
"x" "addx.w\t@er3,@er1" \
91 gdb_test
"x" "addx.w\t@er3-,r1" \
93 gdb_test
"x" "addx.w\t@er3-,@er1-" \
95 gdb_test
"x" "addx.l\t#0x12345678(:32|),er1" \
96 "addx.l #0x12345678:32,er1"
97 gdb_test
"x" "addx.l\t#0x12345678(:32|),@er1" \
98 "addx.l #0x12345678:32,@er1"
99 gdb_test
"x" "addx.l\t#0x12345678(:32|),@er1-" \
100 "addx.l #0x12345678:32,@er1-"
101 gdb_test
"x" "addx.l\ter3,er1" \
103 gdb_test
"x" "addx.l\ter3,@er1" \
105 gdb_test
"x" "addx.l\ter3,@er1-" \
107 gdb_test
"x" "addx.l\t@er3,er1" \
109 gdb_test
"x" "addx.l\t@er3,@er1" \
111 gdb_test
"x" "addx.l\t@er3-,er1" \
113 gdb_test
"x" "addx.l\t@er3-,@er1-" \
115 gdb_test
"x" "subx(.b|)\t#0x12(:8|),r1h" \
117 gdb_test
"x" "subx(.b|)\t#0x12(:8|),@er1" \
118 "subx.b #0x12:8,@er1"
119 gdb_test
"x" "subx(.b|)\t#0x12(:8|),@er1-" \
120 "subx.b #0x12:8,@er1-"
121 gdb_test
"x" "subx(.b|)\tr3h,r1h" \
123 gdb_test
"x" "subx(.b|)\tr3h,@er1" \
125 gdb_test
"x" "subx(.b|)\tr3h,@er1-" \
127 gdb_test
"x" "subx(.b|)\t@er3,r1h" \
129 gdb_test
"x" "subx(.b|)\t@er3,@er1" \
131 gdb_test
"x" "subx(.b|)\t@er3-,r1h" \
133 gdb_test
"x" "subx(.b|)\t@er3-,@er1-" \
135 gdb_test
"x" "subx.w\t#0x1234(:16|),r1" \
136 "subx.w #0x1234:16,r1"
137 gdb_test
"x" "subx.w\t#0x1234(:16|),@er1" \
138 "subx.w #0x1234:16,@er1"
139 gdb_test
"x" "subx.w\t#0x1234(:16|),@er1-" \
140 "subx.w #0x1234:16,@er1-"
141 gdb_test
"x" "subx.w\tr3,r1" \
143 gdb_test
"x" "subx.w\tr3,@er1" \
145 gdb_test
"x" "subx.w\tr3,@er1-" \
147 gdb_test
"x" "subx.w\t@er3,r1" \
149 gdb_test
"x" "subx.w\t@er3,@er1" \
151 gdb_test
"x" "subx.w\t@er3-,r1" \
153 gdb_test
"x" "subx.w\t@er3-,@er1-" \
155 gdb_test
"x" "subx.l\t#0x12345678(:32|),er1" \
156 "subx.l #0x12345678:32,er1"
157 gdb_test
"x" "subx.l\t#0x12345678(:32|),@er1" \
158 "subx.l #0x12345678:32,@er1"
159 gdb_test
"x" "subx.l\t#0x12345678(:32|),@er1-" \
160 "subx.l #0x12345678:32,@er1-"
161 gdb_test
"x" "subx.l\ter3,er1" \
163 gdb_test
"x" "subx.l\ter3,@er1" \
165 gdb_test
"x" "subx.l\ter3,@er1-" \
167 gdb_test
"x" "subx.l\t@er3,er1" \
169 gdb_test
"x" "subx.l\t@er3,@er1" \
171 gdb_test
"x" "subx.l\t@er3-,er1" \
173 gdb_test
"x" "subx.l\t@er3-,@er1-" \
175 gdb_test
"x" "inc(.b|)\tr1h" \
177 gdb_test
"x" "inc(.w|)\t#1,r1" \
179 gdb_test
"x" "inc(.w|)\t#2,r1" \
181 gdb_test
"x" "inc(.l|)\t#1,er1" \
183 gdb_test
"x" "inc(.l|)\t#2,er1" \
185 gdb_test
"x" "dec(.b|)\tr1h" \
187 gdb_test
"x" "dec(.w|)\t#1,r1" \
189 gdb_test
"x" "dec(.w|)\t#2,r1" \
191 gdb_test
"x" "dec(.l|)\t#1,er1" \
193 gdb_test
"x" "dec(.l|)\t#2,er1" \
195 gdb_test
"x" "adds(.l|)\t#1,er1" \
197 gdb_test
"x" "adds(.l|)\t#2,er1" \
199 gdb_test
"x" "adds(.l|)\t#4,er1" \
201 gdb_test
"x" "subs(.l|)\t#1,er1" \
203 gdb_test
"x" "subs(.l|)\t#2,er1" \
205 gdb_test
"x" "subs(.l|)\t#4,er1" \
207 gdb_test
"x" "daa(.b|)\tr1h" \
209 gdb_test
"x" "das(.b|)\tr1h" \
211 gdb_test
"x" "mulxu.b\t#0xf(:4|),r1" \
213 gdb_test
"x" "mulxu.b\tr3h,r1" \
215 gdb_test
"x" "mulxu.w\t#0xf(:4|),er1" \
217 gdb_test
"x" "mulxu.w\tr3,er1" \
219 gdb_test
"x" "divxu.b\t#0xf(:4|),r1" \
221 gdb_test
"x" "divxu.b\tr3h,r1" \
223 gdb_test
"x" "divxu.w\t#0xf(:4|),er1" \
225 gdb_test
"x" "divxu.w\tr3,er1" \
227 gdb_test
"x" "mulxs.b\t#0xf(:4|),r1" \
229 gdb_test
"x" "mulxs.b\tr3h,r1" \
231 gdb_test
"x" "mulxs.w\t#0xf(:4|),er1" \
233 gdb_test
"x" "mulxs.w\tr3,er1" \
235 gdb_test
"x" "divxs.b\t#0xf(:4|),r1" \
237 gdb_test
"x" "divxs.b\tr3h,r1" \
239 gdb_test
"x" "divxs.w\t#0xf(:4|),er1" \
241 gdb_test
"x" "divxs.w\tr3,er1" \
243 gdb_test
"x" "mulu.w\t#0xf(:4|),r1" \
245 gdb_test
"x" "mulu.w\tr3,r1" \
247 gdb_test
"x" "mulu.l\t#0xf(:4|),er1" \
249 gdb_test
"x" "mulu.l\ter3,er1" \
251 gdb_test
"x" "mulu/u.l\t#0xf(:4|),er1" \
252 "mulu/u.l #0xf:4,er1"
253 gdb_test
"x" "mulu/u.l\ter3,er1" \
255 gdb_test
"x" "muls.w\t#0xf(:4|),r1" \
257 gdb_test
"x" "muls.w\tr3,r1" \
259 gdb_test
"x" "muls.l\t#0xf(:4|),er1" \
261 gdb_test
"x" "muls.l\ter3,er1" \
263 gdb_test
"x" "muls/u.l\t#0xf(:4|),er1" \
264 "muls/u.l #0xf:4,er1"
265 gdb_test
"x" "muls/u.l\ter3,er1" \
267 gdb_test
"x" "divu.w\t#0xf(:4|),r1" \
269 gdb_test
"x" "divu.w\tr3,r1" \
271 gdb_test
"x" "divu.l\t#0xf(:4|),er1" \
273 gdb_test
"x" "divu.l\ter3,er1" \
275 gdb_test
"x" "divs.w\t#0xf(:4|),r1" \
277 gdb_test
"x" "divs.w\tr3,r1" \
279 gdb_test
"x" "divs.l\t#0xf(:4|),er1" \
281 gdb_test
"x" "divs.l\ter3,er1" \