1 # Copyright
(C
) 2003-2019 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
3 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
, see
<http
://www.gnu.org
/licenses
/>.
16 # This file was written by Michael Snyder
(msnyder@redhat.com
)
18 if ![istarget
"h8300*-*-*"] {
19 verbose
"Tests ignored for all but h8300s based targets."
24 set testfile
"t06_ari2"
25 set srcfile $
{srcdir
}/$
{subdir
}/$
{testfile
}.s
26 set objfile $
{objdir
}/$
{subdir
}/$
{testfile
}.o
27 set binfile $
{objdir
}/$
{subdir
}/$
{testfile
}.x
30 set link
-flags
"-m h8300sxelf"
33 if {[target_assemble $srcfile $objfile
"${asm-flags}"] != ""} then {
34 untested
"failed to assemble"
38 if {[target_link $objfile $binfile
"${link-flags}"] != ""} then {
39 untested
"failed to link"
44 gdb_reinitialize_dir $srcdir
/$subdir
47 gdb_test
"x /i start" "addx(.b|)\t#0x12(:8|),r1h" \
49 gdb_test
"x" "addx(.b|)\t#0x12(:8|),@er1" \
51 gdb_test
"x" "addx(.b|)\t#0x12(:8|),@er1-" \
52 "addx.b #0x12:8,@er1-"
53 gdb_test
"x" "addx(.b|)\tr3h,r1h" \
55 gdb_test
"x" "addx(.b|)\tr3h,@er1" \
57 gdb_test
"x" "addx(.b|)\tr3h,@er1-" \
59 gdb_test
"x" "addx(.b|)\t@er3,r1h" \
61 gdb_test
"x" "addx(.b|)\t@er3,@er1" \
63 gdb_test
"x" "addx(.b|)\t@er3-,r1h" \
65 gdb_test
"x" "addx(.b|)\t@er3-,@er1-" \
67 gdb_test
"x" "addx.w\t#0x1234(:16|),r1" \
68 "addx.w #0x1234:16,r1"
69 gdb_test
"x" "addx.w\t#0x1234(:16|),@er1" \
70 "addx.w #0x1234:16,@er1"
71 gdb_test
"x" "addx.w\t#0x1234(:16|),@er1-" \
72 "addx.w #0x1234:16,@er1-"
73 gdb_test
"x" "addx.w\tr3,r1" \
75 gdb_test
"x" "addx.w\tr3,@er1" \
77 gdb_test
"x" "addx.w\tr3,@er1-" \
79 gdb_test
"x" "addx.w\t@er3,r1" \
81 gdb_test
"x" "addx.w\t@er3,@er1" \
83 gdb_test
"x" "addx.w\t@er3-,r1" \
85 gdb_test
"x" "addx.w\t@er3-,@er1-" \
87 gdb_test
"x" "addx.l\t#0x12345678(:32|),er1" \
88 "addx.l #0x12345678:32,er1"
89 gdb_test
"x" "addx.l\t#0x12345678(:32|),@er1" \
90 "addx.l #0x12345678:32,@er1"
91 gdb_test
"x" "addx.l\t#0x12345678(:32|),@er1-" \
92 "addx.l #0x12345678:32,@er1-"
93 gdb_test
"x" "addx.l\ter3,er1" \
95 gdb_test
"x" "addx.l\ter3,@er1" \
97 gdb_test
"x" "addx.l\ter3,@er1-" \
99 gdb_test
"x" "addx.l\t@er3,er1" \
101 gdb_test
"x" "addx.l\t@er3,@er1" \
103 gdb_test
"x" "addx.l\t@er3-,er1" \
105 gdb_test
"x" "addx.l\t@er3-,@er1-" \
107 gdb_test
"x" "subx(.b|)\t#0x12(:8|),r1h" \
109 gdb_test
"x" "subx(.b|)\t#0x12(:8|),@er1" \
110 "subx.b #0x12:8,@er1"
111 gdb_test
"x" "subx(.b|)\t#0x12(:8|),@er1-" \
112 "subx.b #0x12:8,@er1-"
113 gdb_test
"x" "subx(.b|)\tr3h,r1h" \
115 gdb_test
"x" "subx(.b|)\tr3h,@er1" \
117 gdb_test
"x" "subx(.b|)\tr3h,@er1-" \
119 gdb_test
"x" "subx(.b|)\t@er3,r1h" \
121 gdb_test
"x" "subx(.b|)\t@er3,@er1" \
123 gdb_test
"x" "subx(.b|)\t@er3-,r1h" \
125 gdb_test
"x" "subx(.b|)\t@er3-,@er1-" \
127 gdb_test
"x" "subx.w\t#0x1234(:16|),r1" \
128 "subx.w #0x1234:16,r1"
129 gdb_test
"x" "subx.w\t#0x1234(:16|),@er1" \
130 "subx.w #0x1234:16,@er1"
131 gdb_test
"x" "subx.w\t#0x1234(:16|),@er1-" \
132 "subx.w #0x1234:16,@er1-"
133 gdb_test
"x" "subx.w\tr3,r1" \
135 gdb_test
"x" "subx.w\tr3,@er1" \
137 gdb_test
"x" "subx.w\tr3,@er1-" \
139 gdb_test
"x" "subx.w\t@er3,r1" \
141 gdb_test
"x" "subx.w\t@er3,@er1" \
143 gdb_test
"x" "subx.w\t@er3-,r1" \
145 gdb_test
"x" "subx.w\t@er3-,@er1-" \
147 gdb_test
"x" "subx.l\t#0x12345678(:32|),er1" \
148 "subx.l #0x12345678:32,er1"
149 gdb_test
"x" "subx.l\t#0x12345678(:32|),@er1" \
150 "subx.l #0x12345678:32,@er1"
151 gdb_test
"x" "subx.l\t#0x12345678(:32|),@er1-" \
152 "subx.l #0x12345678:32,@er1-"
153 gdb_test
"x" "subx.l\ter3,er1" \
155 gdb_test
"x" "subx.l\ter3,@er1" \
157 gdb_test
"x" "subx.l\ter3,@er1-" \
159 gdb_test
"x" "subx.l\t@er3,er1" \
161 gdb_test
"x" "subx.l\t@er3,@er1" \
163 gdb_test
"x" "subx.l\t@er3-,er1" \
165 gdb_test
"x" "subx.l\t@er3-,@er1-" \
167 gdb_test
"x" "inc(.b|)\tr1h" \
169 gdb_test
"x" "inc(.w|)\t#1,r1" \
171 gdb_test
"x" "inc(.w|)\t#2,r1" \
173 gdb_test
"x" "inc(.l|)\t#1,er1" \
175 gdb_test
"x" "inc(.l|)\t#2,er1" \
177 gdb_test
"x" "dec(.b|)\tr1h" \
179 gdb_test
"x" "dec(.w|)\t#1,r1" \
181 gdb_test
"x" "dec(.w|)\t#2,r1" \
183 gdb_test
"x" "dec(.l|)\t#1,er1" \
185 gdb_test
"x" "dec(.l|)\t#2,er1" \
187 gdb_test
"x" "adds(.l|)\t#1,er1" \
189 gdb_test
"x" "adds(.l|)\t#2,er1" \
191 gdb_test
"x" "adds(.l|)\t#4,er1" \
193 gdb_test
"x" "subs(.l|)\t#1,er1" \
195 gdb_test
"x" "subs(.l|)\t#2,er1" \
197 gdb_test
"x" "subs(.l|)\t#4,er1" \
199 gdb_test
"x" "daa(.b|)\tr1h" \
201 gdb_test
"x" "das(.b|)\tr1h" \
203 gdb_test
"x" "mulxu.b\t#0xf(:4|),r1" \
205 gdb_test
"x" "mulxu.b\tr3h,r1" \
207 gdb_test
"x" "mulxu.w\t#0xf(:4|),er1" \
209 gdb_test
"x" "mulxu.w\tr3,er1" \
211 gdb_test
"x" "divxu.b\t#0xf(:4|),r1" \
213 gdb_test
"x" "divxu.b\tr3h,r1" \
215 gdb_test
"x" "divxu.w\t#0xf(:4|),er1" \
217 gdb_test
"x" "divxu.w\tr3,er1" \
219 gdb_test
"x" "mulxs.b\t#0xf(:4|),r1" \
221 gdb_test
"x" "mulxs.b\tr3h,r1" \
223 gdb_test
"x" "mulxs.w\t#0xf(:4|),er1" \
225 gdb_test
"x" "mulxs.w\tr3,er1" \
227 gdb_test
"x" "divxs.b\t#0xf(:4|),r1" \
229 gdb_test
"x" "divxs.b\tr3h,r1" \
231 gdb_test
"x" "divxs.w\t#0xf(:4|),er1" \
233 gdb_test
"x" "divxs.w\tr3,er1" \
235 gdb_test
"x" "mulu.w\t#0xf(:4|),r1" \
237 gdb_test
"x" "mulu.w\tr3,r1" \
239 gdb_test
"x" "mulu.l\t#0xf(:4|),er1" \
241 gdb_test
"x" "mulu.l\ter3,er1" \
243 gdb_test
"x" "mulu/u.l\t#0xf(:4|),er1" \
244 "mulu/u.l #0xf:4,er1"
245 gdb_test
"x" "mulu/u.l\ter3,er1" \
247 gdb_test
"x" "muls.w\t#0xf(:4|),r1" \
249 gdb_test
"x" "muls.w\tr3,r1" \
251 gdb_test
"x" "muls.l\t#0xf(:4|),er1" \
253 gdb_test
"x" "muls.l\ter3,er1" \
255 gdb_test
"x" "muls/u.l\t#0xf(:4|),er1" \
256 "muls/u.l #0xf:4,er1"
257 gdb_test
"x" "muls/u.l\ter3,er1" \
259 gdb_test
"x" "divu.w\t#0xf(:4|),r1" \
261 gdb_test
"x" "divu.w\tr3,r1" \
263 gdb_test
"x" "divu.l\t#0xf(:4|),er1" \
265 gdb_test
"x" "divu.l\ter3,er1" \
267 gdb_test
"x" "divs.w\t#0xf(:4|),r1" \
269 gdb_test
"x" "divs.w\tr3,r1" \
271 gdb_test
"x" "divs.l\t#0xf(:4|),er1" \
273 gdb_test
"x" "divs.l\ter3,er1" \