1 # Copyright (C) 1996 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:
20 # Written by Cygnus Support.
23 set testname "arith.s: Arithmetic operations"
26 gas_start "arith.s" "-al"
28 # Instead of having a variable for each match string just increment the
29 # total number of matches seen. That's simpler when testing large numbers
30 # of instructions (as these tests to).
31 # -re "^ +\[0-9\]+ 0000 489A0000\[^\n\]*\n" { set x [expr $x+1] }
34 -re "^ +\[0-9\]+ 0000 C531\[^\n\]*\n" { set x [expr $x+1] }
35 -re "^ +\[0-9\]+ 0002 4532\[^\n\]*\n" { set x [expr $x+1] }
36 -re "^ +\[0-9\]+ 0004 05360700\[^\n\]*\n" { set x [expr $x+1] }
37 -re "^ +\[0-9\]+ 0008 4530\[^\n\]*\n" { set x [expr $x+1] }
38 -re "^ +\[0-9\]+ 000a E530\[^\n\]*\n" { set x [expr $x+1] }
39 -re "^ +\[0-9\]+ 000c E532\[^\n\]*\n" { set x [expr $x+1] }
40 -re "^ +\[0-9\]+ 000e E5360700\[^\n\]*\n" { set x [expr $x+1] }
41 -re "^ +\[0-9\]+ 0012 E537A000\[^\n\]*\n" { set x [expr $x+1] }
42 -re "^ +\[0-9\]+ 0016 BF32\[^\n\]*\n" { set x [expr $x+1] }
43 -re "^ +\[0-9\]+ 0018 C530\[^\n\]*\n" { set x [expr $x+1] }
44 -re "^ +\[0-9\]+ 001a 2532\[^\n\]*\n" { set x [expr $x+1] }
45 -re "^ +\[0-9\]+ 001c A530\[^\n\]*\n" { set x [expr $x+1] }
46 -re "^ +\[0-9\]+ 001e 65360700\[^\n\]*\n" { set x [expr $x+1] }
47 -re "^ +\[0-9\]+ 0022 8530\[^\n\]*\n" { set x [expr $x+1] }
48 -re "^ +\[0-9\]+ 0024 E537C000\[^\n\]*\n" { set x [expr $x+1] }
49 -re "^ +\[0-9\]+ 0028 DF32\[^\n\]*\n" { set x [expr $x+1] }
50 -re "^ +\[0-9\]+ 002a E5378000\[^\n\]*\n" { set x [expr $x+1] }
51 -re "^ +\[0-9\]+ 002e 9F32\[^\n\]*\n" { set x [expr $x+1] }
52 -re "^ +\[0-9\]+ 0030 A531\[^\n\]*\n" { set x [expr $x+1] }
53 -re "^ +\[0-9\]+ 0032 8531\[^\n\]*\n" { set x [expr $x+1] }
55 timeout { perror "timeout\n"; break }
60 # This was intended to do any cleanup necessary. It kinda looks like it
61 # isn't needed, but just in case, please keep it in for now.
64 # Did we find what we were looking for? If not, flunk it.
65 if [expr $x==20] then { pass $testname } else { fail $testname }
69 set testname "bit.s: bit operations"
72 gas_start "bit.s" "-al"
74 # Instead of having a variable for each match string just increment the
75 # total number of matches seen. That's simpler when testing large numbers
76 # of instructions (as these tests to).
79 -re "^ +\[0-9\]+ 0000 C6AF1000\[^\n\]*\n" { set x [expr $x+1] }
80 -re "^ +\[0-9\]+ 0004 C66F1000\[^\n\]*\n" { set x [expr $x+1] }
81 -re "^ +\[0-9\]+ 0008 C62F1000\[^\n\]*\n" { set x [expr $x+1] }
82 -re "^ +\[0-9\]+ 000c C6EF1000\[^\n\]*\n" { set x [expr $x+1] }
84 timeout { perror "timeout\n"; break }
89 # This was intended to do any cleanup necessary. It kinda looks like it
90 # isn't needed, but just in case, please keep it in for now.
93 # Did we find what we were looking for? If not, flunk it.
94 if [expr $x==4] then { pass $testname } else { fail $testname }
98 set testname "branch.s: branch operations"
101 gas_start "branch.s" "-al"
103 # Instead of having a variable for each match string just increment the
104 # total number of matches seen. That's simpler when testing large numbers
105 # of instructions (as these tests to).
108 -re "^ +\[0-9\]+ 0000 8F05\[^\n\]*\n" { set x [expr $x+1] }
109 -re "^ +\[0-9\]+ 0002 8E05\[^\n\]*\n" { set x [expr $x+1] }
110 -re "^ +\[0-9\]+ 0004 8605\[^\n\]*\n" { set x [expr $x+1] }
111 -re "^ +\[0-9\]+ 0006 8705\[^\n\]*\n" { set x [expr $x+1] }
112 -re "^ +\[0-9\]+ 0008 8B05\[^\n\]*\n" { set x [expr $x+1] }
113 -re "^ +\[0-9\]+ 000a 8905\[^\n\]*\n" { set x [expr $x+1] }
114 -re "^ +\[0-9\]+ 000c 8105\[^\n\]*\n" { set x [expr $x+1] }
115 -re "^ +\[0-9\]+ 000e 8305\[^\n\]*\n" { set x [expr $x+1] }
116 -re "^ +\[0-9\]+ 0010 8205\[^\n\]*\n" { set x [expr $x+1] }
117 -re "^ +\[0-9\]+ 0012 8A05\[^\n\]*\n" { set x [expr $x+1] }
118 -re "^ +\[0-9\]+ 0014 8005\[^\n\]*\n" { set x [expr $x+1] }
119 -re "^ +\[0-9\]+ 0016 8805\[^\n\]*\n" { set x [expr $x+1] }
120 -re "^ +\[0-9\]+ 0018 8405\[^\n\]*\n" { set x [expr $x+1] }
121 -re "^ +\[0-9\]+ 001a 8C05\[^\n\]*\n" { set x [expr $x+1] }
122 -re "^ +\[0-9\]+ 001c 8105\[^\n\]*\n" { set x [expr $x+1] }
123 -re "^ +\[0-9\]+ 001e 8905\[^\n\]*\n" { set x [expr $x+1] }
124 -re "^ +\[0-9\]+ 0020 8205\[^\n\]*\n" { set x [expr $x+1] }
125 -re "^ +\[0-9\]+ 0022 8A05\[^\n\]*\n" { set x [expr $x+1] }
126 -re "^ +\[0-9\]+ 0024 8505\[^\n\]*\n" { set x [expr $x+1] }
127 -re "^ +\[0-9\]+ 0026 8D05\[^\n\]*\n" { set x [expr $x+1] }
129 timeout { perror "timeout\n"; break }
134 # This was intended to do any cleanup necessary. It kinda looks like it
135 # isn't needed, but just in case, please keep it in for now.
138 # Did we find what we were looking for? If not, flunk it.
139 if [expr $x==20] then { pass $testname } else { fail $testname }
143 set testname "compare.s: compare operations"
146 gas_start "compare.s" "-al"
148 # Instead of having a variable for each match string just increment the
149 # total number of matches seen. That's simpler when testing large numbers
150 # of instructions (as these tests to).
153 -re "^ +\[0-9\]+ 0000 E531\[^\n\]*\n" { set x [expr $x+1] }
154 -re "^ +\[0-9\]+ 0002 6532\[^\n\]*\n" { set x [expr $x+1] }
155 -re "^ +\[0-9\]+ 0004 E02F0000\[^\n\]*\n" { set x [expr $x+1] }
156 -re "^ +\[0-9\]+ 0008 E82F0000\[^\n\]*\n" { set x [expr $x+1] }
157 -re "^ +\[0-9\]+ 000c E12F0000\[^\n\]*\n" { set x [expr $x+1] }
158 -re "^ +\[0-9\]+ 0010 E12F0000\[^\n\]*\n" { set x [expr $x+1] }
159 -re "^ +\[0-9\]+ 0014 E92F0000\[^\n\]*\n" { set x [expr $x+1] }
160 -re "^ +\[0-9\]+ 0018 E92F0000\[^\n\]*\n" { set x [expr $x+1] }
161 -re "^ +\[0-9\]+ 001c E22F0000\[^\n\]*\n" { set x [expr $x+1] }
162 -re "^ +\[0-9\]+ 0020 EA2F0000\[^\n\]*\n" { set x [expr $x+1] }
163 -re "^ +\[0-9\]+ 0024 E32F0000\[^\n\]*\n" { set x [expr $x+1] }
164 -re "^ +\[0-9\]+ 0028 EB2F0000\[^\n\]*\n" { set x [expr $x+1] }
165 -re "^ +\[0-9\]+ 002c E42F0000\[^\n\]*\n" { set x [expr $x+1] }
166 -re "^ +\[0-9\]+ 0030 E42F0000\[^\n\]*\n" { set x [expr $x+1] }
167 -re "^ +\[0-9\]+ 0034 EC2F0000\[^\n\]*\n" { set x [expr $x+1] }
168 -re "^ +\[0-9\]+ 0038 EC2F0000\[^\n\]*\n" { set x [expr $x+1] }
169 -re "^ +\[0-9\]+ 003c E52F0000\[^\n\]*\n" { set x [expr $x+1] }
170 -re "^ +\[0-9\]+ 0040 ED2F0000\[^\n\]*\n" { set x [expr $x+1] }
171 -re "^ +\[0-9\]+ 0044 E62F0000\[^\n\]*\n" { set x [expr $x+1] }
172 -re "^ +\[0-9\]+ 0048 EE2F0000\[^\n\]*\n" { set x [expr $x+1] }
173 -re "^ +\[0-9\]+ 004c E72F0000\[^\n\]*\n" { set x [expr $x+1] }
174 -re "^ +\[0-9\]+ 0050 EF2F0000\[^\n\]*\n" { set x [expr $x+1] }
175 -re "^ +\[0-9\]+ 0054 6531\[^\n\]*\n" { set x [expr $x+1] }
177 timeout { perror "timeout\n"; break }
182 # This was intended to do any cleanup necessary. It kinda looks like it
183 # isn't needed, but just in case, please keep it in for now.
186 # Did we find what we were looking for? If not, flunk it.
187 if [expr $x==23] then { pass $testname } else { fail $testname }
191 set testname "jumps.s: jumps operations"
194 gas_start "jumps.s" "-al"
196 # Instead of having a variable for each match string just increment the
197 # total number of matches seen. That's simpler when testing large numbers
198 # of instructions (as these tests to).
201 -re "^ +\[0-9\]+ 0000 802F0000\[^\n\]*\n" { set x [expr $x+1] }
202 -re "^ +\[0-9\]+ 0004 6500\[^\n\]*\n" { set x [expr $x+1] }
203 -re "^ +\[0-9\]+ 0006 80070000\[^\n\]*\n" { set x [expr $x+1] }
205 timeout { perror "timeout\n"; break }
210 # This was intended to do any cleanup necessary. It kinda looks like it
211 # isn't needed, but just in case, please keep it in for now.
214 # Did we find what we were looking for? If not, flunk it.
215 if [expr $x==3] then { pass $testname } else { fail $testname }
219 set testname "logical.s: logical operations"
222 gas_start "logical.s" "-al"
224 # Instead of having a variable for each match string just increment the
225 # total number of matches seen. That's simpler when testing large numbers
226 # of instructions (as these tests to).
229 -re "^ +\[0-9\]+ 0000 4531\[^\n\]*\n" { set x [expr $x+1] }
230 -re "^ +\[0-9\]+ 0002 C5360700\[^\n\]*\n" { set x [expr $x+1] }
231 -re "^ +\[0-9\]+ 0006 2530\[^\n\]*\n" { set x [expr $x+1] }
232 -re "^ +\[0-9\]+ 0008 0531\[^\n\]*\n" { set x [expr $x+1] }
233 -re "^ +\[0-9\]+ 000a 85360700\[^\n\]*\n" { set x [expr $x+1] }
234 -re "^ +\[0-9\]+ 000e 2531\[^\n\]*\n" { set x [expr $x+1] }
235 -re "^ +\[0-9\]+ 0010 A5360700\[^\n\]*\n" { set x [expr $x+1] }
237 timeout { perror "timeout\n"; break }
242 # This was intended to do any cleanup necessary. It kinda looks like it
243 # isn't needed, but just in case, please keep it in for now.
246 # Did we find what we were looking for? If not, flunk it.
247 if [expr $x==7] then { pass $testname } else { fail $testname }
251 set testname "mem.s: memory operations"
254 gas_start "mem.s" "-al"
256 # Instead of having a variable for each match string just increment the
257 # total number of matches seen. That's simpler when testing large numbers
258 # of instructions (as these tests to).
261 -re "^ +\[0-9\]+ 0000 05370500\[^\n\]*\n" { set x [expr $x+1] }
262 -re "^ +\[0-9\]+ 0004 25370400\[^\n\]*\n" { set x [expr $x+1] }
263 -re "^ +\[0-9\]+ 0008 25370500\[^\n\]*\n" { set x [expr $x+1] }
264 -re "^ +\[0-9\]+ 000c\[^\n\]*\n" { set x [expr $x+1] }
265 -re "^ +\[0-9\]+ 000e\[^\n\]*\n" { set x [expr $x+1] }
266 -re "^ +\[0-9\]+ 0010\[^\n\]*\n" { set x [expr $x+1] }
267 -re "^ +\[0-9\]+ 0012 462F0500\[^\n\]*\n" { set x [expr $x+1] }
268 -re "^ +\[0-9\]+ 0016 662F0400\[^\n\]*\n" { set x [expr $x+1] }
269 -re "^ +\[0-9\]+ 001a 662F0500\[^\n\]*\n" { set x [expr $x+1] }
270 -re "^ +\[0-9\]+ 001e\[^\n\]*\n" { set x [expr $x+1] }
271 -re "^ +\[0-9\]+ 0020\[^\n\]*\n" { set x [expr $x+1] }
272 -re "^ +\[0-9\]+ 0022\[^\n\]*\n" { set x [expr $x+1] }
274 timeout { perror "timeout\n"; break }
279 # This was intended to do any cleanup necessary. It kinda looks like it
280 # isn't needed, but just in case, please keep it in for now.
283 # Did we find what we were looking for? If not, flunk it.
284 if [expr $x==12] then { pass $testname } else { fail $testname }
286 setup_xfail v850*-*-*
287 fail "sld and sst instructions improperly assembled."
289 setup_xfail v850*-*-*
290 fail "sld and sst instructions did not catch improper index assembled."
294 set testname "misc.s: misc operations"
297 gas_start "misc.s" "-al"
299 # Instead of having a variable for each match string just increment the
300 # total number of matches seen. That's simpler when testing large numbers
301 # of instructions (as these tests to).
304 -re "^ +\[0-9\]+ 0000\[^\n\]*\n" { set x [expr $x+1] }
305 -re "^ +\[0-9\]+ 0004\[^\n\]*\n" { set x [expr $x+1] }
306 -re "^ +\[0-9\]+ 0008\[^\n\]*\n" { set x [expr $x+1] }
307 -re "^ +\[0-9\]+ 000c\[^\n\]*\n" { set x [expr $x+1] }
308 -re "^ +\[0-9\]+ 000e\[^\n\]*\n" { set x [expr $x+1] }
309 -re "^ +\[0-9\]+ 0012\[^\n\]*\n" { set x [expr $x+1] }
310 -re "^ +\[0-9\]+ 0016\[^\n\]*\n" { set x [expr $x+1] }
311 -re "^ +\[0-9\]+ 001a\[^\n\]*\n" { set x [expr $x+1] }
312 -re "^ +\[0-9\]+ 001e\[^\n\]*\n" { set x [expr $x+1] }
314 timeout { perror "timeout\n"; break }
319 # This was intended to do any cleanup necessary. It kinda looks like it
320 # isn't needed, but just in case, please keep it in for now.
323 # Did we find what we were looking for? If not, flunk it.
324 if [expr $x==9] then { pass $testname } else { fail $testname }
328 set testname "move.s: move operations"
331 gas_start "move.s" "-al"
333 # Instead of having a variable for each match string just increment the
334 # total number of matches seen. That's simpler when testing large numbers
335 # of instructions (as these tests to).
338 -re "^ +\[0-9\]+ 0000\[^\n\]*\n" { set x [expr $x+1] }
339 -re "^ +\[0-9\]+ 0002\[^\n\]*\n" { set x [expr $x+1] }
340 -re "^ +\[0-9\]+ 0004\[^\n\]*\n" { set x [expr $x+1] }
341 -re "^ +\[0-9\]+ 0008\[^\n\]*\n" { set x [expr $x+1] }
343 timeout { perror "timeout\n"; break }
348 # This was intended to do any cleanup necessary. It kinda looks like it
349 # isn't needed, but just in case, please keep it in for now.
352 # Did we find what we were looking for? If not, flunk it.
353 if [expr $x==4] then { pass $testname } else { fail $testname }
356 if [istarget v850*-*-*] then {
357 # Test the basic instruction parser.