1 |
330 |
jeremybenn |
# Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
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 3 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, see .
|
15 |
|
|
|
16 |
|
|
# This file was written by Michael Snyder (msnyder@redhat.com)
|
17 |
|
|
|
18 |
|
|
if $tracelevel then {
|
19 |
|
|
strace $tracelevel
|
20 |
|
|
}
|
21 |
|
|
|
22 |
|
|
if ![istarget "h8300*-*-*"] {
|
23 |
|
|
verbose "Tests ignored for all but h8300s based targets."
|
24 |
|
|
return
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
set testfile "t06_ari2"
|
29 |
|
|
set srcfile ${srcdir}/${subdir}/${testfile}.s
|
30 |
|
|
set objfile ${objdir}/${subdir}/${testfile}.o
|
31 |
|
|
set binfile ${objdir}/${subdir}/${testfile}.x
|
32 |
|
|
|
33 |
|
|
set asm-flags "";
|
34 |
|
|
set link-flags "-m h8300sxelf";
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
|
38 |
|
|
untested t06_ari2.exp
|
39 |
|
|
return -1
|
40 |
|
|
}
|
41 |
|
|
|
42 |
|
|
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
|
43 |
|
|
untested t06_ari2.exp
|
44 |
|
|
return -1
|
45 |
|
|
}
|
46 |
|
|
|
47 |
|
|
gdb_start
|
48 |
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
49 |
|
|
gdb_load $binfile
|
50 |
|
|
|
51 |
|
|
gdb_test "x /i start" "addx(.b|)\t#0x12(:8|),r1h" \
|
52 |
|
|
"addx.b #0x12:8,r1h"
|
53 |
|
|
gdb_test "x" "addx(.b|)\t#0x12(:8|),@er1" \
|
54 |
|
|
"addx.b #0x12:8,@er1"
|
55 |
|
|
gdb_test "x" "addx(.b|)\t#0x12(:8|),@er1-" \
|
56 |
|
|
"addx.b #0x12:8,@er1-"
|
57 |
|
|
gdb_test "x" "addx(.b|)\tr3h,r1h" \
|
58 |
|
|
"addx.b r3h,r1h"
|
59 |
|
|
gdb_test "x" "addx(.b|)\tr3h,@er1" \
|
60 |
|
|
"addx.b r3h,@er1"
|
61 |
|
|
gdb_test "x" "addx(.b|)\tr3h,@er1-" \
|
62 |
|
|
"addx.b r3h,@er1-"
|
63 |
|
|
gdb_test "x" "addx(.b|)\t@er3,r1h" \
|
64 |
|
|
"addx.b @er3,r1h"
|
65 |
|
|
gdb_test "x" "addx(.b|)\t@er3,@er1" \
|
66 |
|
|
"addx.b @er3,@er1"
|
67 |
|
|
gdb_test "x" "addx(.b|)\t@er3-,r1h" \
|
68 |
|
|
"addx.b @er3-,r1h"
|
69 |
|
|
gdb_test "x" "addx(.b|)\t@er3-,@er1-" \
|
70 |
|
|
"addx.b @er3-,@er1-"
|
71 |
|
|
gdb_test "x" "addx.w\t#0x1234(:16|),r1" \
|
72 |
|
|
"addx.w #0x1234:16,r1"
|
73 |
|
|
gdb_test "x" "addx.w\t#0x1234(:16|),@er1" \
|
74 |
|
|
"addx.w #0x1234:16,@er1"
|
75 |
|
|
gdb_test "x" "addx.w\t#0x1234(:16|),@er1-" \
|
76 |
|
|
"addx.w #0x1234:16,@er1-"
|
77 |
|
|
gdb_test "x" "addx.w\tr3,r1" \
|
78 |
|
|
"addx.w r3,r1"
|
79 |
|
|
gdb_test "x" "addx.w\tr3,@er1" \
|
80 |
|
|
"addx.w r3,@er1"
|
81 |
|
|
gdb_test "x" "addx.w\tr3,@er1-" \
|
82 |
|
|
"addx.w r3,@er1-"
|
83 |
|
|
gdb_test "x" "addx.w\t@er3,r1" \
|
84 |
|
|
"addx.w @er3,r1"
|
85 |
|
|
gdb_test "x" "addx.w\t@er3,@er1" \
|
86 |
|
|
"addx.w @er3,@er1"
|
87 |
|
|
gdb_test "x" "addx.w\t@er3-,r1" \
|
88 |
|
|
"addx.w @er3-,r1"
|
89 |
|
|
gdb_test "x" "addx.w\t@er3-,@er1-" \
|
90 |
|
|
"addx.w @er3-,@er1-"
|
91 |
|
|
gdb_test "x" "addx.l\t#0x12345678(:32|),er1" \
|
92 |
|
|
"addx.l #0x12345678:32,er1"
|
93 |
|
|
gdb_test "x" "addx.l\t#0x12345678(:32|),@er1" \
|
94 |
|
|
"addx.l #0x12345678:32,@er1"
|
95 |
|
|
gdb_test "x" "addx.l\t#0x12345678(:32|),@er1-" \
|
96 |
|
|
"addx.l #0x12345678:32,@er1-"
|
97 |
|
|
gdb_test "x" "addx.l\ter3,er1" \
|
98 |
|
|
"addx.l er3,er1"
|
99 |
|
|
gdb_test "x" "addx.l\ter3,@er1" \
|
100 |
|
|
"addx.l er3,@er1"
|
101 |
|
|
gdb_test "x" "addx.l\ter3,@er1-" \
|
102 |
|
|
"addx.l er3,@er1-"
|
103 |
|
|
gdb_test "x" "addx.l\t@er3,er1" \
|
104 |
|
|
"addx.l @er3,er1"
|
105 |
|
|
gdb_test "x" "addx.l\t@er3,@er1" \
|
106 |
|
|
"addx.l @er3,@er1"
|
107 |
|
|
gdb_test "x" "addx.l\t@er3-,er1" \
|
108 |
|
|
"addx.l @er3-,er1"
|
109 |
|
|
gdb_test "x" "addx.l\t@er3-,@er1-" \
|
110 |
|
|
"addx.l @er3-,@er1-"
|
111 |
|
|
gdb_test "x" "subx(.b|)\t#0x12(:8|),r1h" \
|
112 |
|
|
"subx.b #0x12:8,r1h"
|
113 |
|
|
gdb_test "x" "subx(.b|)\t#0x12(:8|),@er1" \
|
114 |
|
|
"subx.b #0x12:8,@er1"
|
115 |
|
|
gdb_test "x" "subx(.b|)\t#0x12(:8|),@er1-" \
|
116 |
|
|
"subx.b #0x12:8,@er1-"
|
117 |
|
|
gdb_test "x" "subx(.b|)\tr3h,r1h" \
|
118 |
|
|
"subx.b r3h,r1h"
|
119 |
|
|
gdb_test "x" "subx(.b|)\tr3h,@er1" \
|
120 |
|
|
"subx.b r3h,@er1"
|
121 |
|
|
gdb_test "x" "subx(.b|)\tr3h,@er1-" \
|
122 |
|
|
"subx.b r3h,@er1-"
|
123 |
|
|
gdb_test "x" "subx(.b|)\t@er3,r1h" \
|
124 |
|
|
"subx.b @er3,r1h"
|
125 |
|
|
gdb_test "x" "subx(.b|)\t@er3,@er1" \
|
126 |
|
|
"subx.b @er3,@er1"
|
127 |
|
|
gdb_test "x" "subx(.b|)\t@er3-,r1h" \
|
128 |
|
|
"subx.b @er3-,r1h"
|
129 |
|
|
gdb_test "x" "subx(.b|)\t@er3-,@er1-" \
|
130 |
|
|
"subx.b @er3-,@er1-"
|
131 |
|
|
gdb_test "x" "subx.w\t#0x1234(:16|),r1" \
|
132 |
|
|
"subx.w #0x1234:16,r1"
|
133 |
|
|
gdb_test "x" "subx.w\t#0x1234(:16|),@er1" \
|
134 |
|
|
"subx.w #0x1234:16,@er1"
|
135 |
|
|
gdb_test "x" "subx.w\t#0x1234(:16|),@er1-" \
|
136 |
|
|
"subx.w #0x1234:16,@er1-"
|
137 |
|
|
gdb_test "x" "subx.w\tr3,r1" \
|
138 |
|
|
"subx.w r3,r1"
|
139 |
|
|
gdb_test "x" "subx.w\tr3,@er1" \
|
140 |
|
|
"subx.w r3,@er1"
|
141 |
|
|
gdb_test "x" "subx.w\tr3,@er1-" \
|
142 |
|
|
"subx.w r3,@er1-"
|
143 |
|
|
gdb_test "x" "subx.w\t@er3,r1" \
|
144 |
|
|
"subx.w @er3,r1"
|
145 |
|
|
gdb_test "x" "subx.w\t@er3,@er1" \
|
146 |
|
|
"subx.w @er3,@er1"
|
147 |
|
|
gdb_test "x" "subx.w\t@er3-,r1" \
|
148 |
|
|
"subx.w @er3-,r1"
|
149 |
|
|
gdb_test "x" "subx.w\t@er3-,@er1-" \
|
150 |
|
|
"subx.w @er3-,@er1-"
|
151 |
|
|
gdb_test "x" "subx.l\t#0x12345678(:32|),er1" \
|
152 |
|
|
"subx.l #0x12345678:32,er1"
|
153 |
|
|
gdb_test "x" "subx.l\t#0x12345678(:32|),@er1" \
|
154 |
|
|
"subx.l #0x12345678:32,@er1"
|
155 |
|
|
gdb_test "x" "subx.l\t#0x12345678(:32|),@er1-" \
|
156 |
|
|
"subx.l #0x12345678:32,@er1-"
|
157 |
|
|
gdb_test "x" "subx.l\ter3,er1" \
|
158 |
|
|
"subx.l er3,er1"
|
159 |
|
|
gdb_test "x" "subx.l\ter3,@er1" \
|
160 |
|
|
"subx.l er3,@er1"
|
161 |
|
|
gdb_test "x" "subx.l\ter3,@er1-" \
|
162 |
|
|
"subx.l er3,@er1-"
|
163 |
|
|
gdb_test "x" "subx.l\t@er3,er1" \
|
164 |
|
|
"subx.l @er3,er1"
|
165 |
|
|
gdb_test "x" "subx.l\t@er3,@er1" \
|
166 |
|
|
"subx.l @er3,@er1"
|
167 |
|
|
gdb_test "x" "subx.l\t@er3-,er1" \
|
168 |
|
|
"subx.l @er3-,er1"
|
169 |
|
|
gdb_test "x" "subx.l\t@er3-,@er1-" \
|
170 |
|
|
"subx.l @er3-,@er1-"
|
171 |
|
|
gdb_test "x" "inc(.b|)\tr1h" \
|
172 |
|
|
"inc.b r1h"
|
173 |
|
|
gdb_test "x" "inc(.w|)\t#1,r1" \
|
174 |
|
|
"inc.w #1,r1"
|
175 |
|
|
gdb_test "x" "inc(.w|)\t#2,r1" \
|
176 |
|
|
"inc.w #2,r1"
|
177 |
|
|
gdb_test "x" "inc(.l|)\t#1,er1" \
|
178 |
|
|
"inc.l #1,er1"
|
179 |
|
|
gdb_test "x" "inc(.l|)\t#2,er1" \
|
180 |
|
|
"inc.l #2,er1"
|
181 |
|
|
gdb_test "x" "dec(.b|)\tr1h" \
|
182 |
|
|
"dec.b r1h"
|
183 |
|
|
gdb_test "x" "dec(.w|)\t#1,r1" \
|
184 |
|
|
"dec.w #1,r1"
|
185 |
|
|
gdb_test "x" "dec(.w|)\t#2,r1" \
|
186 |
|
|
"dec.w #2,r1"
|
187 |
|
|
gdb_test "x" "dec(.l|)\t#1,er1" \
|
188 |
|
|
"dec.l #1,er1"
|
189 |
|
|
gdb_test "x" "dec(.l|)\t#2,er1" \
|
190 |
|
|
"dec.l #2,er1"
|
191 |
|
|
gdb_test "x" "adds(.l|)\t#1,er1" \
|
192 |
|
|
"adds.l #1,er1"
|
193 |
|
|
gdb_test "x" "adds(.l|)\t#2,er1" \
|
194 |
|
|
"adds.l #2,er1"
|
195 |
|
|
gdb_test "x" "adds(.l|)\t#4,er1" \
|
196 |
|
|
"adds.l #4,er1"
|
197 |
|
|
gdb_test "x" "subs(.l|)\t#1,er1" \
|
198 |
|
|
"subs.l #1,er1"
|
199 |
|
|
gdb_test "x" "subs(.l|)\t#2,er1" \
|
200 |
|
|
"subs.l #2,er1"
|
201 |
|
|
gdb_test "x" "subs(.l|)\t#4,er1" \
|
202 |
|
|
"subs.l #4,er1"
|
203 |
|
|
gdb_test "x" "daa(.b|)\tr1h" \
|
204 |
|
|
"daa.b r1h"
|
205 |
|
|
gdb_test "x" "das(.b|)\tr1h" \
|
206 |
|
|
"das.b r1h"
|
207 |
|
|
gdb_test "x" "mulxu.b\t#0xf(:4|),r1" \
|
208 |
|
|
"mulxu.b #0xf:4,r1"
|
209 |
|
|
gdb_test "x" "mulxu.b\tr3h,r1" \
|
210 |
|
|
"mulxu.b r3h,r1"
|
211 |
|
|
gdb_test "x" "mulxu.w\t#0xf(:4|),er1" \
|
212 |
|
|
"mulxu.w #0xf:4,er1"
|
213 |
|
|
gdb_test "x" "mulxu.w\tr3,er1" \
|
214 |
|
|
"mulxu.w r3,er1"
|
215 |
|
|
gdb_test "x" "divxu.b\t#0xf(:4|),r1" \
|
216 |
|
|
"divxu.b #0xf:4,r1"
|
217 |
|
|
gdb_test "x" "divxu.b\tr3h,r1" \
|
218 |
|
|
"divxu.b r3h,r1"
|
219 |
|
|
gdb_test "x" "divxu.w\t#0xf(:4|),er1" \
|
220 |
|
|
"divxu.w #0xf:4,er1"
|
221 |
|
|
gdb_test "x" "divxu.w\tr3,er1" \
|
222 |
|
|
"divxu.w r3,er1"
|
223 |
|
|
gdb_test "x" "mulxs.b\t#0xf(:4|),r1" \
|
224 |
|
|
"mulxs.b #0xf:4,r1"
|
225 |
|
|
gdb_test "x" "mulxs.b\tr3h,r1" \
|
226 |
|
|
"mulxs.b r3h,r1"
|
227 |
|
|
gdb_test "x" "mulxs.w\t#0xf(:4|),er1" \
|
228 |
|
|
"mulxs.w #0xf:4,er1"
|
229 |
|
|
gdb_test "x" "mulxs.w\tr3,er1" \
|
230 |
|
|
"mulxs.w r3,er1"
|
231 |
|
|
gdb_test "x" "divxs.b\t#0xf(:4|),r1" \
|
232 |
|
|
"divxs.b #0xf:4,r1"
|
233 |
|
|
gdb_test "x" "divxs.b\tr3h,r1" \
|
234 |
|
|
"divxs.b r3h,r1"
|
235 |
|
|
gdb_test "x" "divxs.w\t#0xf(:4|),er1" \
|
236 |
|
|
"divxs.w #0xf:4,er1"
|
237 |
|
|
gdb_test "x" "divxs.w\tr3,er1" \
|
238 |
|
|
"divxs.w r3,er1"
|
239 |
|
|
gdb_test "x" "mulu.w\t#0xf(:4|),r1" \
|
240 |
|
|
"mulu.w #0xf:4,r1"
|
241 |
|
|
gdb_test "x" "mulu.w\tr3,r1" \
|
242 |
|
|
"mulu.w r3,r1"
|
243 |
|
|
gdb_test "x" "mulu.l\t#0xf(:4|),er1" \
|
244 |
|
|
"mulu.l #0xf:4,er1"
|
245 |
|
|
gdb_test "x" "mulu.l\ter3,er1" \
|
246 |
|
|
"mulu.l er3,er1"
|
247 |
|
|
gdb_test "x" "mulu/u.l\t#0xf(:4|),er1" \
|
248 |
|
|
"mulu/u.l #0xf:4,er1"
|
249 |
|
|
gdb_test "x" "mulu/u.l\ter3,er1" \
|
250 |
|
|
"mulu/u.l er3,er1"
|
251 |
|
|
gdb_test "x" "muls.w\t#0xf(:4|),r1" \
|
252 |
|
|
"muls.w #0xf:4,r1"
|
253 |
|
|
gdb_test "x" "muls.w\tr3,r1" \
|
254 |
|
|
"muls.w r3,r1"
|
255 |
|
|
gdb_test "x" "muls.l\t#0xf(:4|),er1" \
|
256 |
|
|
"muls.l #0xf:4,er1"
|
257 |
|
|
gdb_test "x" "muls.l\ter3,er1" \
|
258 |
|
|
"muls.l er3,er1"
|
259 |
|
|
gdb_test "x" "muls/u.l\t#0xf(:4|),er1" \
|
260 |
|
|
"muls/u.l #0xf:4,er1"
|
261 |
|
|
gdb_test "x" "muls/u.l\ter3,er1" \
|
262 |
|
|
"muls/u.l er3,er1"
|
263 |
|
|
gdb_test "x" "divu.w\t#0xf(:4|),r1" \
|
264 |
|
|
"divu.w #0xf:4,r1"
|
265 |
|
|
gdb_test "x" "divu.w\tr3,r1" \
|
266 |
|
|
"divu.w r3,r1"
|
267 |
|
|
gdb_test "x" "divu.l\t#0xf(:4|),er1" \
|
268 |
|
|
"divu.l #0xf:4,er1"
|
269 |
|
|
gdb_test "x" "divu.l\ter3,er1" \
|
270 |
|
|
"divu.l er3,er1"
|
271 |
|
|
gdb_test "x" "divs.w\t#0xf(:4|),r1" \
|
272 |
|
|
"divs.w #0xf:4,r1"
|
273 |
|
|
gdb_test "x" "divs.w\tr3,r1" \
|
274 |
|
|
"divs.w r3,r1"
|
275 |
|
|
gdb_test "x" "divs.l\t#0xf(:4|),er1" \
|
276 |
|
|
"divs.l #0xf:4,er1"
|
277 |
|
|
gdb_test "x" "divs.l\ter3,er1" \
|
278 |
|
|
"divs.l er3,er1"
|