Commit | Line | Data |
---|---|---|
e407c74b | 1 | # Copyright 2012, 2013 |
5bf135a7 NC |
2 | # Free Software Foundation, Inc. |
3 | ||
4 | # This program is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 3 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
17 | ||
252b5132 RH |
18 | # |
19 | # Some generic MIPS tests | |
20 | # | |
d9e138e2 | 21 | |
5915a74a CD |
22 | # When adding a new test to this file, try to do the following things: |
23 | # | |
24 | # * If testing assembly and disassembly of code, don't forget to test | |
25 | # the actual bit encodings of the instructions (using the | |
26 | # --show-raw-insn flag to objdump). | |
27 | # | |
28 | # * Try to run the test for as many architectures as appropriate, | |
29 | # using the "run_dump_test_arches" or "run_list_test_arches" functions, | |
30 | # along with the output from a call to "mips_arch_list_matching." | |
31 | # | |
32 | # * Be sure to compare the test output before and after your testsuite | |
33 | # changes, to verify that existing and new tests were run as expected. | |
34 | # Look for expect ERROR messages in the testsuite .log file to make sure | |
35 | # the new expect code did not contain errors. | |
36 | ||
37 | # To add support for a new CPU to this file, add an appropriate entry | |
38 | # to the sequence of "mips_arch_create" function calls below, and test | |
39 | # the result. The new CPU should automatically be used when running | |
40 | # various tests. If the new CPU is the default CPU for any tool | |
41 | # targets, make sure the call to "mips_arch_create" reflects that fact. | |
42 | ||
43 | ||
5915a74a CD |
44 | # The functions below create and manipulate an "architecture data |
45 | # array" which contains entries for each MIPS architecture (or CPU) | |
46 | # known to these tests. The array contains the following information | |
47 | # for each architecture, indexed by the name of the architecture | |
48 | # described by the entry: | |
49 | # | |
50 | # displayname: The name of the entry to be used for pretty-printing. | |
51 | # | |
52 | # gprsize: The size in bits of General Purpose Registers provided by | |
53 | # the architecture (must be 32 or 64). | |
54 | # | |
55 | # props: A list of text strings which are associated with the | |
56 | # architecture. These include the architecture name as well as | |
57 | # information about what instructions the CPU supports. When matching | |
58 | # based on properties, an additional property is added to the normal | |
59 | # property list, "gpr<gprsize>" so that tests can match CPUs which | |
60 | # have GPRs of a specific size. The following properties are most | |
61 | # useful when matching properties for generic (i.e., not CPU-specific) | |
62 | # tests: | |
63 | # | |
64 | # mips1, mips2, mips3, mips4, mips5, mips32, mips64 | |
65 | # The architecture includes the instructions defined | |
66 | # by that MIPS ISA. | |
67 | # | |
8d367dd5 MR |
68 | # fpisa3, fpisa4, fpisa5 |
69 | # The architecture includes the floating-point | |
70 | # instructions defined by that MIPS ISA. | |
71 | # | |
af22f5b2 CD |
72 | # gpr_ilocks |
73 | # The architecture interlocks GPRs accesses. (That is, | |
74 | # there are no load delay slots.) | |
75 | # | |
5915a74a CD |
76 | # mips3d The architecture includes the MIPS-3D ASE. |
77 | # | |
78 | # ror The architecture includes hardware rotate instructions. | |
79 | # | |
80 | # gpr32, gpr64 | |
81 | # The architecture provides 32- or 64-bit General Purpose | |
82 | # Registers. | |
83 | # | |
e407c74b NC |
84 | # singlefloat |
85 | # The CPU is 64 bit, but only supports 32 bit FPU. | |
86 | # | |
0aa27725 RS |
87 | # nollsc |
88 | # The CPU doesn't support ll, sc, lld and scd instructions. | |
89 | # | |
5915a74a CD |
90 | # as_flags: The assembler flags used when assembling tests for this |
91 | # architecture. | |
92 | # | |
93 | # objdump_flags: The objdump flags used when disassembling tests for | |
94 | # this architecture. | |
95 | # | |
96 | # Most entries in the architecture array will have values in all of | |
97 | # the fields above. One entry, "default" represents the default CPU | |
98 | # based on the target of the assembler being built. If always has | |
99 | # empty "as_flags" and "objdump_flags." | |
100 | ||
4d8728e1 CD |
101 | # mips_arch_init |
102 | # | |
103 | # This function initializes the architecture data array ("mips_arches") | |
104 | # to be empty. | |
105 | proc mips_arch_init {} { | |
106 | global mips_arches | |
74cb52a6 | 107 | |
95d4c932 | 108 | # Catch because the variable won't be set the first time through. |
74cb52a6 | 109 | catch {unset mips_arches} |
4d8728e1 CD |
110 | } |
111 | ||
5915a74a CD |
112 | # mips_arch_create ARCH GPRSIZE EXTENDS PROPS AS_FLAGS OBJDUMP_FLAGS \ |
113 | # (optional:) DEFAULT_FOR_TARGETS | |
114 | # | |
115 | # This function creates a new entry in the architecture data array, | |
116 | # for the architecture or CPU named ARCH, and fills in the entry | |
117 | # according to the rest of the arguments. | |
118 | # | |
119 | # The new entry's property list is initialized to contain ARCH, any | |
120 | # properties specified by PROPS, and the properties associated with | |
121 | # the entry specified by EXTENDS. (The new architecture is considered | |
122 | # to extend the capabilities provided by that architecture.) | |
123 | # | |
124 | # If DEFAULT_FOR_TARGETS is specified, it is a list of targets for which | |
125 | # this architecture is the default architecture. If "istarget" returns | |
126 | # true for any of the targets in the list, a "default" entry will be | |
127 | # added to the architecture array which indicates that ARCH is the default | |
128 | # architecture. | |
129 | proc mips_arch_create {arch gprsize extends props as_flags objdump_flags | |
130 | {default_for_targets {}}} { | |
131 | global mips_arches | |
132 | ||
133 | if { [info exists mips_arches($arch)] } { | |
134 | error "mips_arch_create: arch \"$arch\" already exists" | |
135 | } | |
136 | if { $gprsize != 32 && $gprsize != 64 } { | |
137 | error "mips_arch_create: invalid GPR size $gprsize" | |
138 | } | |
139 | ||
140 | set archdata(displayname) $arch | |
141 | set archdata(gprsize) $gprsize | |
142 | set archdata(as_flags) $as_flags | |
143 | set archdata(objdump_flags) $objdump_flags | |
144 | set archdata(props) $arch | |
145 | eval lappend archdata(props) $props | |
146 | if { [string length $extends] != 0 } { | |
147 | eval lappend archdata(props) [mips_arch_properties $extends 0] | |
148 | } | |
149 | ||
150 | set mips_arches($arch) [array get archdata] | |
151 | ||
152 | # Set as default if appropriate. | |
153 | foreach target $default_for_targets { | |
154 | if { [istarget $target] } { | |
155 | if { [info exists mips_arches(default)] } { | |
156 | error "mips_arch_create: default arch already exists" | |
157 | } | |
158 | ||
159 | set archdata(displayname) "default = $arch" | |
160 | set archdata(as_flags) "" | |
161 | set archdata(objdump_flags) "" | |
162 | ||
163 | set mips_arches(default) [array get archdata] | |
164 | break | |
165 | } | |
166 | } | |
167 | } | |
168 | ||
30cfc97a MR |
169 | # mips_arch_destroy ARCH |
170 | # | |
171 | # The opposite of the above. This function removes an entry from | |
172 | # the architecture data array, for the architecture or CPU named ARCH. | |
173 | ||
174 | proc mips_arch_destroy {arch} { | |
175 | global mips_arches | |
176 | ||
177 | if { [info exists mips_arches($arch)] } { | |
178 | unset mips_arches($arch) | |
179 | } | |
180 | } | |
181 | ||
5915a74a CD |
182 | # mips_arch_list_all |
183 | # | |
184 | # This function returns the list of all names of entries in the | |
185 | # architecture data array (including the default entry, if a default | |
186 | # is known). | |
187 | proc mips_arch_list_all {} { | |
188 | global mips_arches | |
189 | return [lsort -dictionary [array names mips_arches]] | |
190 | } | |
191 | ||
192 | # mips_arch_data ARCH | |
193 | # | |
194 | # This function returns the information associated with ARCH | |
195 | # in the architecture data array, in "array get" form. | |
196 | proc mips_arch_data {arch} { | |
197 | global mips_arches | |
198 | ||
199 | if { ! [info exists mips_arches($arch)] } { | |
200 | error "mips_arch_data: unknown arch \"$arch\"" | |
201 | } | |
202 | return $mips_arches($arch) | |
203 | } | |
204 | ||
205 | # mips_arch_displayname ARCH | |
206 | # | |
207 | # This function returns the printable name associated with ARCH in | |
208 | # the architecture data array. | |
209 | proc mips_arch_displayname {arch} { | |
210 | array set archdata [mips_arch_data $arch] | |
211 | return $archdata(displayname) | |
212 | } | |
213 | ||
214 | # mips_arch_properties ARCH (optional:) INCLUDE_GPRSIZE | |
215 | # | |
216 | # This function returns the property list associated with ARCH in the | |
475a10d0 MR |
217 | # architecture data array, including the "canonical" target name as the |
218 | # first element. | |
219 | # | |
220 | # If INCLUDE_GPRSIZE is non-zero, an additional "gpr32" or "gpr64" | |
221 | # property will be returned as part of the list based on the | |
222 | # architecture's GPR size. | |
5915a74a CD |
223 | proc mips_arch_properties {arch {include_gprsize 1}} { |
224 | array set archdata [mips_arch_data $arch] | |
225 | set props $archdata(props) | |
226 | if { $include_gprsize } { | |
227 | lappend props gpr$archdata(gprsize) | |
228 | } | |
229 | return $props | |
230 | } | |
231 | ||
232 | # mips_arch_as_flags ARCH | |
233 | # | |
234 | # This function returns the assembler flags associated with ARCH in | |
235 | # the architecture data array. | |
236 | proc mips_arch_as_flags {arch} { | |
237 | array set archdata [mips_arch_data $arch] | |
238 | return $archdata(as_flags) | |
239 | } | |
240 | ||
241 | # mips_arch_objdump_flags ARCH | |
242 | # | |
243 | # This function returns the objdump disassembly flags associated with | |
244 | # ARCH in the architecture data array. | |
245 | proc mips_arch_objdump_flags {arch} { | |
246 | array set archdata [mips_arch_data $arch] | |
247 | return $archdata(objdump_flags) | |
248 | } | |
249 | ||
250 | # mips_arch_matches ARCH PROPMATCHLIST | |
251 | # | |
252 | # This function returns non-zero if ARCH matches the set of properties | |
253 | # described by PROPMATCHLIST. Each entry in PROPMATCHLIST can either | |
254 | # be the name of a property which must be matched, or "!" followed by | |
255 | # the name of a property which must not be matched. ARCH matches | |
256 | # PROPMATCHLIST if and only if all of the conditions specified by | |
257 | # PROPMATCHLIST are satisfied. | |
258 | proc mips_arch_matches {arch propmatchlist} { | |
259 | foreach pm $propmatchlist { | |
260 | if { [string match {!*} $pm] } { | |
261 | # fail if present. | |
262 | set inverted 1 | |
263 | set p [string range $pm 1 end] | |
264 | } { | |
265 | # fail if not present. | |
266 | set inverted 0 | |
267 | set p $pm | |
268 | } | |
269 | ||
270 | set loc [lsearch -exact [mips_arch_properties $arch] $p] | |
271 | ||
272 | # required-absent and found, or required-present and not found: fail. | |
273 | if { ($inverted && $loc != -1) || (! $inverted && $loc == -1) } { | |
274 | return 0 | |
275 | } | |
276 | } | |
277 | return 1 | |
278 | } | |
279 | ||
280 | # mips_arch_list_matching ARGS | |
281 | # | |
282 | # This function returns a list of all architectures which match | |
283 | # the conditions described by its arguments. Its arguments are | |
284 | # taken as a list and used as the PROPMATCHLIST in a call to | |
285 | # "mips_arch_matches" for each known architecture. | |
286 | proc mips_arch_list_matching {args} { | |
287 | set l "" | |
288 | foreach arch [mips_arch_list_all] { | |
289 | # For now, don't match default arch until we know what its | |
290 | # properties actually are. | |
291 | if { [string compare $arch default] == 0 | |
292 | && [string length [mips_arch_properties default]] == 0} { | |
c0b22597 | 293 | continue |
5915a74a CD |
294 | } |
295 | if { [mips_arch_matches $arch $args] } { | |
296 | lappend l $arch | |
297 | } | |
298 | } | |
299 | return $l | |
300 | } | |
301 | ||
302 | ||
303 | # The functions below facilitate running various types of tests. | |
304 | ||
725fc8ed | 305 | # run_dump_test_arch NAME OPTS ARCH |
5915a74a | 306 | # |
725fc8ed RS |
307 | # Invoke "run_dump_test" for test NAME with additional assembler options OPTS. |
308 | # Add the assembler and disassembler flags that are associated with | |
309 | # architecture ARCH. | |
8b7955ca | 310 | # |
16e5e222 RS |
311 | # You can override the expected output for particular architectures. |
312 | # The possible test names are, in order of preference: | |
8b7955ca | 313 | # |
16e5e222 RS |
314 | # 1. CARCH@NAME.d |
315 | # 2. NAME.d | |
8b7955ca MR |
316 | # |
317 | # where CARCH is the "canonical" name of architecture ARCH as recorded | |
16e5e222 | 318 | # in its associated property list. |
725fc8ed | 319 | proc run_dump_test_arch { name opts arch } { |
193fa632 MR |
320 | global subdir srcdir |
321 | ||
475a10d0 | 322 | set proparch [lindex [mips_arch_properties $arch 0] 0] |
16e5e222 | 323 | set prefixes [list ${proparch}@ ] |
dd6a37e7 | 324 | if { [ string match "octeon*" $proparch ] && $proparch != "octeon" } { |
16e5e222 | 325 | lappend prefixes octeon@ |
dd6a37e7 | 326 | } |
dd6a37e7 | 327 | foreach prefix ${prefixes} { |
8b7955ca MR |
328 | set archname ${prefix}${name} |
329 | if { [file exists "$srcdir/$subdir/${archname}.d"] } { | |
330 | set name $archname | |
331 | break | |
332 | } | |
193fa632 | 333 | } |
5915a74a CD |
334 | |
335 | if [catch {run_dump_test $name \ | |
725fc8ed RS |
336 | "{name {([concat $opts [mips_arch_displayname $arch]])}} |
337 | {objdump {[mips_arch_objdump_flags $arch]}} | |
338 | {as {[concat $opts [mips_arch_as_flags $arch]]}}"} rv] { | |
5915a74a CD |
339 | perror "$rv" |
340 | untested "$subdir/$name ($arch)" | |
341 | } | |
342 | } | |
343 | ||
725fc8ed | 344 | # run_dump_test_arches NAME [OPTS] ARCH_LIST |
5915a74a CD |
345 | # |
346 | # Invoke "run_dump_test_arch" for test NAME, for each architecture | |
725fc8ed RS |
347 | # listed in ARCH_LIST. OPTS, if specified, is a list of additional |
348 | # assembler options that should be used for all architectures. | |
349 | proc run_dump_test_arches { name args } { | |
725fc8ed RS |
350 | set opts "" |
351 | if { [llength $args] > 1 } { | |
352 | set opts [lindex $args 0] | |
353 | set args [lrange $args 1 end] | |
354 | } | |
355 | set arch_list [lindex $args 0] | |
5915a74a | 356 | foreach arch $arch_list { |
725fc8ed | 357 | run_dump_test_arch $name $opts $arch |
5915a74a CD |
358 | } |
359 | } | |
360 | ||
5915a74a CD |
361 | # run_list_test_arch NAME OPTS ARCH |
362 | # | |
725fc8ed RS |
363 | # Invoke "run_list_test" for test NAME with additional assembler options OPTS. |
364 | # Add the assembler flags that are associated with architecture ARCH. | |
5915a74a CD |
365 | proc run_list_test_arch { name opts arch } { |
366 | global subdir | |
367 | ||
725fc8ed RS |
368 | set testname "MIPS $name ([concat $opts [mips_arch_displayname $arch]])" |
369 | if [catch {run_list_test \ | |
370 | $name \ | |
371 | [concat $opts [mips_arch_as_flags $arch]] \ | |
372 | $testname} rv] { | |
5915a74a CD |
373 | perror "$rv" |
374 | untested "$testname" | |
375 | } | |
376 | } | |
377 | ||
725fc8ed | 378 | # run_list_test_arches NAME [OPTS] ARCH_LIST |
5915a74a | 379 | # |
725fc8ed RS |
380 | # Invoke "run_list_test_arch" for test NAME, for each architecture listed |
381 | # in ARCH_LIST. OPTS, if specified, is a list of additional assembler | |
382 | # options that should be used for all architectures. | |
383 | proc run_list_test_arches { name args } { | |
384 | set opts "" | |
385 | if { [llength $args] > 1 } { | |
386 | set opts [lindex $args 0] | |
387 | set args [lrange $args 1 end] | |
388 | } | |
389 | set arch_list [lindex $args 0] | |
5915a74a CD |
390 | foreach arch $arch_list { |
391 | run_list_test_arch "$name" "$opts" "$arch" | |
392 | } | |
393 | } | |
394 | ||
395 | ||
396 | # Create the architecture data array by providing data for all | |
397 | # known architectures. | |
398 | # | |
399 | # Note that several targets pick default CPU based on ABI. We | |
400 | # can't easily handle that; do NOT list those targets as defaulting | |
401 | # to any architecture. | |
4d8728e1 | 402 | mips_arch_init |
5915a74a CD |
403 | mips_arch_create mips1 32 {} {} \ |
404 | { -march=mips1 -mtune=mips1 } { -mmips:3000 } | |
af22f5b2 | 405 | mips_arch_create mips2 32 mips1 { gpr_ilocks } \ |
5915a74a | 406 | { -march=mips2 -mtune=mips2 } { -mmips:6000 } |
8d367dd5 | 407 | mips_arch_create mips3 64 mips2 { fpisa3 } \ |
5915a74a | 408 | { -march=mips3 -mtune=mips3 } { -mmips:4000 } |
8d367dd5 | 409 | mips_arch_create mips4 64 mips3 { fpisa4 } \ |
5915a74a | 410 | { -march=mips4 -mtune=mips4 } { -mmips:8000 } |
8d367dd5 | 411 | mips_arch_create mips5 64 mips4 { fpisa5 } \ |
5915a74a CD |
412 | { -march=mips5 -mtune=mips5 } { -mmips:mips5 } |
413 | mips_arch_create mips32 32 mips2 {} \ | |
414 | { -march=mips32 -mtune=mips32 } { -mmips:isa32 } \ | |
415 | { mipsisa32-*-* mipsisa32el-*-* } | |
8d367dd5 | 416 | mips_arch_create mips32r2 32 mips32 { fpisa3 fpisa4 fpisa5 ror } \ |
af7ee8bf CD |
417 | { -march=mips32r2 -mtune=mips32r2 } \ |
418 | { -mmips:isa32r2 } \ | |
419 | { mipsisa32r2-*-* mipsisa32r2el-*-* } | |
5915a74a CD |
420 | mips_arch_create mips64 64 mips5 { mips32 } \ |
421 | { -march=mips64 -mtune=mips64 } { -mmips:isa64 } \ | |
422 | { mipsisa64-*-* mipsisa64el-*-* } | |
5f74bc13 CD |
423 | mips_arch_create mips64r2 64 mips64 { mips32r2 ror } \ |
424 | { -march=mips64r2 -mtune=mips64r2 } \ | |
425 | { -mmips:isa64r2 } \ | |
426 | { mipsisa64r2-*-* mipsisa64r2el-*-* } | |
30cfc97a MR |
427 | mips_arch_create mips16 32 {} {} \ |
428 | { -march=mips1 -mips16 } { -mmips:16 } | |
df58fc94 RS |
429 | mips_arch_create micromips 64 mips64r2 {} \ |
430 | { -march=mips64 -mmicromips } {} | |
5915a74a CD |
431 | mips_arch_create r3000 32 mips1 {} \ |
432 | { -march=r3000 -mtune=r3000 } { -mmips:3000 } | |
af22f5b2 | 433 | mips_arch_create r3900 32 mips1 { gpr_ilocks } \ |
5915a74a CD |
434 | { -march=r3900 -mtune=r3900 } { -mmips:3900 } \ |
435 | { mipstx39-*-* mipstx39el-*-* } | |
436 | mips_arch_create r4000 64 mips3 {} \ | |
437 | { -march=r4000 -mtune=r4000 } { -mmips:4000 } | |
438 | mips_arch_create vr5400 64 mips4 { ror } \ | |
439 | { -march=vr5400 -mtune=vr5400 } { -mmips:5400 } | |
440 | mips_arch_create sb1 64 mips64 { mips3d } \ | |
441 | { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \ | |
442 | { mipsisa64sb1-*-* mipsisa64sb1el-*-* } | |
61d4e56d AN |
443 | mips_arch_create octeon 64 mips64r2 {} \ |
444 | { -march=octeon -mtune=octeon } { -mmips:octeon } \ | |
445 | { mips64octeon*-*-* } | |
dd6a37e7 AP |
446 | mips_arch_create octeonp 64 octeon {} \ |
447 | { -march=octeon+ -mtune=octeon+ } { -mmips:octeon+ } \ | |
448 | { } | |
432233b3 AP |
449 | mips_arch_create octeon2 64 octeonp {} \ |
450 | { -march=octeon2 -mtune=octeon2 } { -mmips:octeon2 } \ | |
451 | { } | |
52b6b6b9 JM |
452 | mips_arch_create xlr 64 mips64 {} \ |
453 | { -march=xlr -mtune=xlr } { -mmips:xlr } | |
0aa27725 | 454 | mips_arch_create r5900 64 mips3 { gpr_ilocks singlefloat nollsc } \ |
e407c74b NC |
455 | { -march=r5900 -mtune=r5900 } { -mmips:5900 } \ |
456 | { mipsr5900el-*-* mips64r5900el-*-* } | |
5915a74a | 457 | |
5915a74a | 458 | # |
0a44bf69 RS |
459 | # And now begin the actual tests! VxWorks uses RELA rather than REL |
460 | # relocations, so most of the generic dump tests will not work there. | |
5915a74a | 461 | # |
0a44bf69 RS |
462 | if { [istarget mips*-*-vxworks*] } { |
463 | run_dump_test "vxworks1" | |
464 | run_dump_test "vxworks1-xgot" | |
a284cff1 TS |
465 | run_dump_test "vxworks1-el" |
466 | run_dump_test "vxworks1-xgot-el" | |
0a44bf69 | 467 | } elseif { [istarget mips*-*-*] } { |
16e5e222 | 468 | set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*]] |
99262e37 | 469 | set has_newabi [expr [istarget *-*-irix6*] || [istarget mips*-*-linux*] || [istarget mips*-sde-elf*]] |
252b5132 | 470 | |
16e5e222 RS |
471 | if { [istarget "mips*-*-*linux*"] |
472 | || [istarget "mips*-sde-elf*"] | |
473 | || [istarget "mips*-*-*bsd*"] } then { | |
ff8715d0 L |
474 | set tmips "t" |
475 | } else { | |
476 | set tmips "" | |
477 | } | |
0c4ec151 | 478 | if [istarget mips*el-*-*] { |
5ef0935e | 479 | set el "el" |
0c4ec151 RS |
480 | } { |
481 | set el "" | |
482 | } | |
e1b47bd5 RS |
483 | |
484 | run_dump_test_arches "dot-1" [mips_arch_list_matching mips1] | |
5915a74a CD |
485 | run_dump_test_arches "abs" [mips_arch_list_matching mips1] |
486 | run_dump_test_arches "add" [mips_arch_list_matching mips1] | |
487 | run_dump_test_arches "and" [mips_arch_list_matching mips1] | |
a242dc0d AN |
488 | run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1] |
489 | run_list_test_arches "mips1-fp" "-32 -msoft-float" \ | |
490 | [mips_arch_list_matching mips1] | |
252b5132 RH |
491 | run_dump_test "break20" |
492 | run_dump_test "trap20" | |
51124b6c | 493 | |
8404fc53 MR |
494 | run_dump_test_arches "beq" [mips_arch_list_matching mips1] |
495 | run_dump_test_arches "bge" [mips_arch_list_matching mips1] | |
496 | run_dump_test_arches "bgeu" [mips_arch_list_matching mips1] | |
497 | run_dump_test_arches "blt" [mips_arch_list_matching mips1] | |
498 | run_dump_test_arches "bltu" [mips_arch_list_matching mips1] | |
499 | run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2] | |
5915a74a | 500 | run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1] |
bad36eac DJ |
501 | run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1] |
502 | run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1] | |
503 | run_dump_test_arches "branch-misc-2-64" [mips_arch_list_matching mips3] | |
504 | run_dump_test_arches "branch-misc-2pic-64" [mips_arch_list_matching mips3] | |
dc36a61f | 505 | run_dump_test "branch-misc-3" |
f7870c8d | 506 | run_dump_test "branch-swap" |
464ab0e5 | 507 | |
16e5e222 RS |
508 | # Sweep a range of branch offsets so that it hits a position where |
509 | # it is at the beginning of a frag and then swapped with a 16-bit | |
510 | # instruction from the preceding frag. The offset will be somewhere | |
511 | # close below 4096 as this is the default obstack size limit that | |
512 | # we use and some space will have been already consumed. The exact | |
513 | # amount depends on the host's programming model. | |
514 | for { set count 960 } { $count <= 1024 } { incr count } { | |
515 | run_list_test "branch-swap-2" "--defsym count=$count" \ | |
516 | "MIPS branch swapping ($count)" | |
464ab0e5 MR |
517 | } |
518 | ||
23fce1e3 | 519 | run_dump_test "div" |
51124b6c | 520 | |
b892b944 | 521 | if { !$addr32 } { |
16e5e222 | 522 | run_dump_test_arches "dli" [mips_arch_list_matching mips3] |
7388e440 | 523 | } |
16e5e222 | 524 | run_dump_test_arches "jal" [mips_arch_list_matching mips1] |
df58fc94 RS |
525 | run_dump_test_arches "jal-mask-11" [mips_arch_list_matching mips1] |
526 | run_dump_test_arches "jal-mask-12" [mips_arch_list_matching mips1] | |
527 | run_dump_test_arches "jal-mask-21" [mips_arch_list_matching micromips] | |
528 | run_dump_test_arches "jal-mask-22" [mips_arch_list_matching micromips] | |
ff239038 CM |
529 | run_dump_test "eret-1" |
530 | run_dump_test "eret-2" | |
531 | run_dump_test "eret-3" | |
a8d14a88 CM |
532 | run_dump_test_arches "fix-rm7000-1" \ |
533 | [mips_arch_list_matching mips3 !singlefloat] | |
534 | run_dump_test_arches "fix-rm7000-2" \ | |
535 | [mips_arch_list_matching mips3 !singlefloat] | |
df58fc94 | 536 | run_dump_test_arches "24k-branch-delay-1" \ |
fbdd3712 | 537 | [mips_arch_list_matching mips1] |
17b09558 | 538 | run_dump_test_arches "24k-triple-stores-1" \ |
fbdd3712 | 539 | [mips_arch_list_matching fpisa5 !octeon] |
df58fc94 | 540 | run_dump_test_arches "24k-triple-stores-2" \ |
fbdd3712 | 541 | [mips_arch_list_matching mips2] |
0aa27725 RS |
542 | run_dump_test_arches "24k-triple-stores-2-llsc" \ |
543 | [mips_arch_list_matching mips2 !nollsc] | |
df58fc94 | 544 | run_dump_test_arches "24k-triple-stores-3" \ |
fbdd3712 | 545 | [mips_arch_list_matching mips2] |
df58fc94 | 546 | run_dump_test_arches "24k-triple-stores-4" \ |
e407c74b | 547 | [mips_arch_list_matching mips2 !singlefloat] |
df58fc94 | 548 | run_dump_test_arches "24k-triple-stores-5" \ |
fbdd3712 | 549 | [mips_arch_list_matching mips1] |
df58fc94 | 550 | run_dump_test_arches "24k-triple-stores-6" \ |
e407c74b | 551 | [mips_arch_list_matching mips2 !singlefloat] |
df58fc94 | 552 | run_dump_test_arches "24k-triple-stores-7" \ |
e407c74b | 553 | [mips_arch_list_matching mips2 !singlefloat] |
df58fc94 | 554 | run_dump_test_arches "24k-triple-stores-8" \ |
fbdd3712 | 555 | [mips_arch_list_matching mips1] |
df58fc94 | 556 | run_dump_test_arches "24k-triple-stores-9" \ |
fbdd3712 | 557 | [mips_arch_list_matching mips1] |
df58fc94 | 558 | run_dump_test_arches "24k-triple-stores-10" \ |
fbdd3712 | 559 | [mips_arch_list_matching mips1] |
16e5e222 | 560 | run_dump_test_arches "24k-triple-stores-11" \ |
fbdd3712 | 561 | [mips_arch_list_matching mips1] |
6a32d874 | 562 | |
16e5e222 RS |
563 | run_dump_test_arches "jal-svr4pic" [mips_arch_list_matching mips1] |
564 | run_dump_test_arches "jal-svr4pic-noreorder" \ | |
4d2ad3b0 | 565 | [mips_arch_list_matching mips1] |
16e5e222 | 566 | run_dump_test "jal-xgot" |
21b99e26 | 567 | run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1] |
3302cdec | 568 | if $has_newabi { run_dump_test "jal-newabi" } |
16e5e222 RS |
569 | run_dump_test "la" |
570 | run_dump_test "la-svr4pic" | |
571 | run_dump_test "la-xgot" | |
572 | run_dump_test "lca-svr4pic" | |
573 | run_dump_test "lca-xgot" | |
574 | # XXX FIXME: Has mips2 and later insns with mips1 disassemblies. | |
575 | # (Should split and then use appropriate arch lists.) | |
576 | run_dump_test_arches "lb" [mips_arch_list_matching mips1 !mips2] | |
577 | run_dump_test_arches "lb-svr4pic" \ | |
30cfc97a | 578 | [mips_arch_list_matching mips1 !gpr_ilocks] |
16e5e222 RS |
579 | run_dump_test_arches "lb-svr4pic-ilocks" [mips_arch_list_matching gpr_ilocks] |
580 | # Both versions specify the cpu, so we can run both regardless of | |
581 | # the interlocking in the configured default cpu. | |
582 | run_dump_test "lb-xgot" | |
583 | run_dump_test "lb-xgot-ilocks" | |
584 | run_dump_test_arches "ld" [mips_arch_list_matching mips1] | |
585 | run_dump_test_arches "ld-forward" [mips_arch_list_matching mips1] | |
586 | run_dump_test_arches "sd" [mips_arch_list_matching mips1] | |
587 | run_dump_test_arches "sd-forward" [mips_arch_list_matching mips1] | |
588 | run_dump_test_arches "l_d" [mips_arch_list_matching mips1 !singlefloat] | |
589 | run_dump_test_arches "l_d-single" [mips_arch_list_matching mips1 singlefloat] | |
590 | run_dump_test_arches "l_d-forward" [mips_arch_list_matching mips1 !singlefloat] | |
591 | run_dump_test_arches "s_d" [mips_arch_list_matching mips1 !singlefloat] | |
592 | run_dump_test_arches "s_d-single" [mips_arch_list_matching mips1 singlefloat] | |
593 | run_dump_test_arches "s_d-forward" [mips_arch_list_matching mips1 !singlefloat] | |
594 | run_dump_test_arches "ldc1" [mips_arch_list_matching mips2 !singlefloat] | |
595 | run_dump_test_arches "ldc1-forward" [mips_arch_list_matching mips2 !singlefloat] | |
596 | run_dump_test_arches "sdc1" [mips_arch_list_matching mips2 !singlefloat] | |
597 | run_dump_test_arches "sdc1-forward" [mips_arch_list_matching mips2 !singlefloat] | |
598 | if $has_newabi { | |
599 | run_dump_test_arches "ld-n32" [mips_arch_list_matching mips3] | |
600 | run_dump_test_arches "ld-forward-n32" \ | |
17f828b3 | 601 | [mips_arch_list_matching mips3] |
16e5e222 RS |
602 | run_dump_test_arches "sd-n32" [mips_arch_list_matching mips3] |
603 | run_dump_test_arches "sd-forward-n32" \ | |
17f828b3 | 604 | [mips_arch_list_matching mips3] |
16e5e222 RS |
605 | run_dump_test_arches "l_d-n32" [mips_arch_list_matching mips3 !singlefloat] |
606 | run_dump_test_arches "l_d-forward-n32" \ | |
e407c74b | 607 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
608 | run_dump_test_arches "s_d-n32" [mips_arch_list_matching mips3 !singlefloat] |
609 | run_dump_test_arches "s_d-forward-n32" \ | |
e407c74b | 610 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
611 | run_dump_test_arches "ldc1-n32" [mips_arch_list_matching mips3 !singlefloat] |
612 | run_dump_test_arches "ldc1-forward-n32" \ | |
e407c74b | 613 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
614 | run_dump_test_arches "sdc1-n32" [mips_arch_list_matching mips3 !singlefloat] |
615 | run_dump_test_arches "sdc1-forward-n32" \ | |
e407c74b | 616 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
617 | run_dump_test_arches "ld-n64" [mips_arch_list_matching mips3] |
618 | run_dump_test_arches "ld-forward-n64" \ | |
484cf558 | 619 | [mips_arch_list_matching mips3] |
16e5e222 RS |
620 | run_dump_test_arches "sd-n64" [mips_arch_list_matching mips3] |
621 | run_dump_test_arches "sd-forward-n64" \ | |
17f828b3 | 622 | [mips_arch_list_matching mips3] |
16e5e222 RS |
623 | run_dump_test_arches "l_d-n64" [mips_arch_list_matching mips3 !singlefloat] |
624 | run_dump_test_arches "l_d-forward-n64" \ | |
e407c74b | 625 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
626 | run_dump_test_arches "s_d-n64" [mips_arch_list_matching mips3 !singlefloat] |
627 | run_dump_test_arches "s_d-forward-n64" \ | |
e407c74b | 628 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
629 | run_dump_test_arches "ldc1-n64" [mips_arch_list_matching mips3 !singlefloat] |
630 | run_dump_test_arches "ldc1-forward-n64" \ | |
e407c74b | 631 | [mips_arch_list_matching mips3 !singlefloat] |
16e5e222 RS |
632 | run_dump_test_arches "sdc1-n64" [mips_arch_list_matching mips3 !singlefloat] |
633 | run_dump_test_arches "sdc1-forward-n64" \ | |
e407c74b | 634 | [mips_arch_list_matching mips3 !singlefloat] |
252b5132 | 635 | } |
f19ccbda MR |
636 | run_dump_test_arches "ld-zero" [mips_arch_list_matching mips1] |
637 | run_dump_test_arches "ld-zero-2" [mips_arch_list_matching mips2 !nollsc] | |
638 | run_dump_test_arches "ld-zero-3" [mips_arch_list_matching mips3 !nollsc] | |
639 | run_dump_test_arches "ld-zero-u" [mips_arch_list_matching micromips] | |
640 | run_dump_test_arches "ld-zero-q" [mips_arch_list_matching r5900] | |
16e5e222 RS |
641 | run_dump_test "ld-svr4pic" |
642 | run_dump_test "ld-xgot" | |
5915a74a | 643 | run_dump_test_arches "li" [mips_arch_list_matching mips1] |
16e5e222 RS |
644 | run_dump_test "lifloat" |
645 | run_dump_test "lif-svr4pic" | |
646 | run_dump_test "lif-xgot" | |
5915a74a | 647 | run_dump_test_arches "mips4" [mips_arch_list_matching mips4] |
725fc8ed RS |
648 | run_dump_test_arches "mips4-fp" "-32" \ |
649 | [mips_arch_list_matching fpisa4] | |
650 | run_dump_test_arches "mips4-fp" "-mabi=o64" \ | |
651 | [mips_arch_list_matching fpisa4 gpr64] | |
f6829a45 | 652 | run_list_test_arches "mips4-fp" "-32 -msoft-float" \ |
8d367dd5 | 653 | [mips_arch_list_matching fpisa4] |
ad500c2e MR |
654 | run_dump_test_arches "mips4-branch-likely" \ |
655 | [mips_arch_list_matching mips4] | |
656 | run_list_test_arches "mips4-branch-likely" "-32 -msoft-float" \ | |
657 | [mips_arch_list_matching mips4] | |
725fc8ed RS |
658 | run_dump_test_arches "mips5-fp" "-32" \ |
659 | [mips_arch_list_matching fpisa5] | |
660 | run_dump_test_arches "mips5-fp" "-mabi=o64" \ | |
661 | [mips_arch_list_matching fpisa5 gpr64] | |
23fce1e3 | 662 | run_dump_test "mul" |
5915a74a | 663 | |
30cfc97a | 664 | run_dump_test_arches "rol" [mips_arch_list_matching mips1 !ror] |
5915a74a CD |
665 | run_dump_test_arches "rol-hw" [mips_arch_list_matching ror] |
666 | ||
667 | run_dump_test_arches "rol64" [mips_arch_list_matching gpr64 !ror] | |
668 | run_dump_test_arches "rol64-hw" [mips_arch_list_matching gpr64 ror] | |
669 | ||
16e5e222 | 670 | run_dump_test "sb" |
252b5132 | 671 | run_dump_test "trunc" |
16e5e222 | 672 | run_dump_test "ulh" |
af22f5b2 CD |
673 | run_dump_test_arches "ulh2-eb" [mips_arch_list_matching mips1] |
674 | run_dump_test_arches "ulh2-el" [mips_arch_list_matching mips1] | |
16e5e222 RS |
675 | run_dump_test "ulh-svr4pic" |
676 | run_dump_test "ulh-xgot" | |
677 | run_dump_test "ulw" | |
678 | run_dump_test "uld" | |
679 | run_dump_test "ush" | |
680 | run_dump_test "usw" | |
681 | run_dump_test "usd" | |
682 | run_dump_test_arches "ulw2-eb" [mips_arch_list_matching mips1 !gpr_ilocks] | |
af22f5b2 | 683 | run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks] |
16e5e222 | 684 | run_dump_test_arches "ulw2-el" [mips_arch_list_matching mips1 !gpr_ilocks] |
af22f5b2 CD |
685 | run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks] |
686 | ||
687 | run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3] | |
688 | run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3] | |
689 | ||
16e5e222 RS |
690 | run_dump_test "mips16" |
691 | run_dump_test "mips16-64" | |
0acfaea6 | 692 | run_dump_test "mips16-macro" |
16e5e222 RS |
693 | # Check MIPS16e extensions |
694 | run_dump_test_arches "mips16e" [mips_arch_list_matching mips32 !micromips] | |
695 | # Check jalx handling | |
696 | run_dump_test "mips16-jalx" | |
697 | run_dump_test "mips-jalx" | |
698 | run_dump_test "mips-jalx-2" | |
699 | # Check MIPS16 HI16/LO16 relocations | |
700 | run_dump_test "mips16-hilo" | |
701 | if $has_newabi { | |
702 | run_dump_test "mips16-hilo-n32" | |
3396de36 | 703 | } |
16e5e222 | 704 | run_dump_test "mips16-hilo-match" |
252b5132 RH |
705 | run_dump_test "delay" |
706 | run_dump_test "nodelay" | |
707 | run_dump_test "mips4010" | |
708 | run_dump_test "mips4650" | |
709 | run_dump_test "mips4100" | |
60b63b72 RS |
710 | run_dump_test "vr4111" |
711 | run_dump_test "vr4120" | |
532c738a | 712 | run_dump_test "vr4120-2" |
11db99f8 | 713 | run_dump_test "vr4130" |
60b63b72 | 714 | run_dump_test "vr5400" |
5c324c16 | 715 | run_list_test "vr5400-ill" "-march=vr5400" |
60b63b72 | 716 | run_dump_test "vr5500" |
5a7ea749 | 717 | run_dump_test "rm7000" |
99c14723 | 718 | run_dump_test "perfcount" |
252b5132 RH |
719 | run_dump_test "lineno" |
720 | run_dump_test "sync" | |
5915a74a | 721 | |
16e5e222 | 722 | run_dump_test_arches "virt" [mips_arch_list_matching mips32r2] |
cdd49898 | 723 | run_dump_test_arches "virt64" [mips_arch_list_matching mips64r2] |
b015e599 | 724 | |
5915a74a | 725 | run_dump_test_arches "mips32" [mips_arch_list_matching mips32] |
df58fc94 | 726 | run_dump_test_arches "mips32-imm" [mips_arch_list_matching mips32] |
5915a74a | 727 | |
1787fe5b | 728 | run_dump_test_arches "mips32-sf32" [mips_arch_list_matching mips32] |
f6829a45 AN |
729 | run_list_test_arches "mips32-sf32" "-32 -msoft-float" \ |
730 | [mips_arch_list_matching mips32] | |
a6d8f55b AN |
731 | run_dump_test_arches "mips32-cp2" [mips_arch_list_matching mips32 \ |
732 | !octeon] | |
1787fe5b | 733 | |
af7ee8bf | 734 | run_dump_test_arches "mips32r2" [mips_arch_list_matching mips32r2] |
a6d8f55b AN |
735 | run_dump_test_arches "mips32r2-cp2" [mips_arch_list_matching mips32r2 \ |
736 | !octeon] | |
f6829a45 AN |
737 | run_dump_test_arches "mips32r2-fp32" \ |
738 | [mips_arch_list_matching mips32r2] | |
739 | run_list_test_arches "mips32r2-fp32" "-32 -msoft-float" \ | |
740 | [mips_arch_list_matching mips32r2] | |
5f74bc13 | 741 | run_list_test_arches "mips32r2-ill" "-32" \ |
f6829a45 | 742 | [mips_arch_list_matching mips32r2 gpr32] |
5f74bc13 | 743 | run_list_test_arches "mips32r2-ill-fp64" "-mabi=o64" \ |
f6829a45 AN |
744 | [mips_arch_list_matching mips32r2 gpr64] |
745 | run_list_test_arches "mips32r2-ill-nofp" "-32 -msoft-float" \ | |
746 | [mips_arch_list_matching mips32r2] | |
af7ee8bf | 747 | |
5915a74a | 748 | run_dump_test_arches "mips64" [mips_arch_list_matching mips64] |
a6d8f55b AN |
749 | run_dump_test_arches "mips64-cp2" [mips_arch_list_matching mips64 \ |
750 | !octeon] | |
5915a74a | 751 | |
5f74bc13 | 752 | run_dump_test_arches "mips64r2" [mips_arch_list_matching mips64r2] |
725fc8ed | 753 | run_list_test_arches "mips64r2-ill" [mips_arch_list_matching mips64r2] |
5f74bc13 | 754 | |
fef14a42 TS |
755 | run_dump_test "set-arch" |
756 | ||
b892b944 TS |
757 | if { !$addr32 } { |
758 | run_dump_test "mips64-mips3d" | |
759 | run_dump_test_arches "mips64-mips3d-incl" [mips_arch_list_matching mips3d] | |
5915a74a | 760 | |
b892b944 TS |
761 | run_dump_test "mips64-mdmx" |
762 | run_dump_test "sb1-ext-mdmx" | |
763 | run_dump_test "sb1-ext-ps" | |
52b6b6b9 | 764 | run_dump_test "xlr-ext" |
b892b944 | 765 | } |
252b5132 | 766 | |
66b3e8da MR |
767 | run_dump_test_arches "relax" [mips_arch_list_matching mips2] |
768 | run_dump_test_arches "relax-at" [mips_arch_list_matching mips2] | |
895921c9 MR |
769 | run_dump_test "relax-swap1-mips1" |
770 | run_dump_test "relax-swap1-mips2" | |
771 | run_dump_test "relax-swap2" | |
9301f9c3 | 772 | run_dump_test_arches "relax-swap3" [mips_arch_list_all] |
3bf0dbfb MR |
773 | run_list_test_arches "relax-bc1any" "-mips3d -relax-branch" \ |
774 | [mips_arch_list_matching mips64 \ | |
775 | !micromips] | |
d455268f | 776 | run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \ |
df58fc94 RS |
777 | [mips_arch_list_matching mips64r2 \ |
778 | !micromips] | |
594e740f | 779 | |
7f3c4072 CM |
780 | run_dump_test_arches "eva" [mips_arch_list_matching mips32r2 !octeon] |
781 | ||
21b99e26 AO |
782 | run_list_test "illegal" "-32" |
783 | run_list_test "baddata1" "-32" | |
e7c604dd | 784 | run_list_test "jalr" "" |
d9e138e2 | 785 | |
dc462216 RS |
786 | run_dump_test "mips-gp32-fp32" |
787 | run_dump_test "mips-gp32-fp64" | |
788 | run_dump_test "mips-gp64-fp32" | |
789 | run_dump_test "mips-gp64-fp64" | |
dc462216 | 790 | |
16e5e222 RS |
791 | # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file |
792 | # containing 4650-specific instructions with -m4650 and -mcpu=4650, | |
793 | # and verify that they're the same. Specifically, we're checking | |
794 | # that the EF_MIPS_MACH field is set, and that the 4650 'mul' | |
795 | # instruction does get used. In previous versions of GAS, | |
796 | # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't. | |
797 | run_dump_test "elf_e_flags1" | |
798 | run_dump_test "elf_e_flags2" | |
799 | run_dump_test "elf_e_flags3" | |
800 | run_dump_test "elf_e_flags4" | |
801 | ||
802 | # Check EF_MIPS_ARCH markings for each supported architecture. | |
803 | run_dump_test "elf_arch_mips1" | |
804 | run_dump_test "elf_arch_mips2" | |
805 | run_dump_test "elf_arch_mips3" | |
806 | run_dump_test "elf_arch_mips4" | |
807 | run_dump_test "elf_arch_mips5" | |
808 | run_dump_test "elf_arch_mips32" | |
809 | run_dump_test "elf_arch_mips32r2" | |
810 | run_dump_test "elf_arch_mips64" | |
811 | run_dump_test "elf_arch_mips64r2" | |
812 | ||
813 | # Verify that ASE markings are handled properly. | |
814 | run_dump_test "elf_ase_mips16" | |
815 | run_dump_test "elf_ase_mips16-2" | |
816 | ||
817 | run_dump_test "elf_ase_micromips" | |
818 | run_dump_test "elf_ase_micromips-2" | |
819 | ||
820 | run_dump_test "mips-gp32-fp32-pic" | |
821 | run_dump_test "mips-gp32-fp64-pic" | |
822 | run_dump_test "mips-gp64-fp32-pic" | |
823 | run_dump_test "mips-gp64-fp64-pic" | |
824 | ||
825 | run_dump_test "mips-abi32" | |
826 | run_dump_test "mips-abi32-pic" | |
827 | run_dump_test "mips-abi32-pic2" | |
828 | ||
829 | run_dump_test "elf${el}-rel" | |
830 | run_dump_test_arches "elf${el}-rel2" [mips_arch_list_matching gpr64 !singlefloat] | |
831 | run_dump_test "e32${el}-rel2" | |
832 | run_dump_test "elf${el}-rel3" | |
833 | run_dump_test_arches "elf-rel4" [mips_arch_list_matching gpr64] | |
834 | run_dump_test "e32-rel4" | |
835 | run_dump_test "elf-rel5" | |
836 | run_dump_test "elf-rel6" | |
837 | if $has_newabi { | |
838 | run_dump_test "elf-rel6-n32" | |
839 | run_dump_test "elf-rel6-n64" | |
840 | } | |
841 | run_dump_test "elf-rel7" | |
842 | run_dump_test "elf-rel8" | |
843 | run_dump_test "elf-rel8-mips16" | |
844 | run_dump_test "elf-rel9" | |
845 | run_dump_test "elf-rel9-mips16" | |
846 | if $has_newabi { | |
847 | run_dump_test "elf-rel10" | |
848 | run_dump_test "elf-rel11" | |
849 | } | |
850 | run_dump_test "elf-rel12" | |
851 | run_dump_test "elf-rel13" | |
852 | run_dump_test "elf-rel13-mips16" | |
853 | run_dump_test "elf-rel14" | |
70a31400 | 854 | |
16e5e222 RS |
855 | if $has_newabi { |
856 | run_dump_test "elf-rel15" | |
857 | run_dump_test "elf-rel16" | |
05760fd2 | 858 | |
16e5e222 RS |
859 | run_dump_test "elf-rel-got-n32" |
860 | run_dump_test "elf-rel-xgot-n32" | |
861 | run_dump_test "elf-rel-got-n64" | |
862 | run_dump_test "elf-rel-xgot-n64" | |
863 | } | |
864 | run_dump_test "elf-rel17" | |
865 | if $has_newabi { | |
866 | run_dump_test "elf-rel18" | |
867 | } | |
868 | run_dump_test "elf-rel19" | |
869 | run_dump_test "elf-rel20" | |
870 | if $has_newabi { | |
871 | run_dump_test "elf-rel21" | |
872 | run_dump_test "elf-rel22" | |
873 | run_dump_test "elf-rel23" | |
874 | run_dump_test "elf-rel23a" | |
875 | run_dump_test "elf-rel23b" | |
876 | run_dump_test "elf-rel24" | |
877 | } | |
e8ede7c7 | 878 | |
16e5e222 RS |
879 | run_dump_test "elf-rel25" |
880 | run_dump_test "elf-rel25a" | |
881 | run_dump_test "elf-rel26" | |
30cfc97a | 882 | |
16e5e222 | 883 | run_dump_test_arches "elf-rel27" [mips_arch_list_all] |
e391c024 | 884 | |
16e5e222 RS |
885 | if $has_newabi { |
886 | run_dump_test "elf-rel28-n32" | |
887 | run_dump_test "elf-rel28-n64" | |
888 | run_dump_test_arches "elf-rel29" [mips_arch_list_matching mips3] | |
889 | } | |
890 | run_list_test_arches "elf-rel30" "-32" [mips_arch_list_all] | |
08ddc280 | 891 | |
16e5e222 RS |
892 | run_dump_test "${tmips}mips${el}16-e" |
893 | run_dump_test "${tmips}mips${el}16-f" | |
ce70d90a | 894 | |
16e5e222 RS |
895 | run_dump_test "elf-consthilo" |
896 | run_dump_test "expr1" | |
e3a82c8e | 897 | |
16e5e222 RS |
898 | run_list_test "tls-ill" "-32" |
899 | run_dump_test "tls-o32" | |
900 | run_dump_test "tls-relw" | |
901 | run_dump_test "jalr2" | |
902 | run_dump_test_arches "jalr3" [mips_arch_list_matching mips1 \ | |
903 | !micromips] | |
904 | if $has_newabi { | |
905 | run_dump_test_arches "jalr3-n32" \ | |
906 | [mips_arch_list_matching mips3 \ | |
907 | !micromips] | |
908 | run_dump_test_arches "jalr3-n64" \ | |
909 | [mips_arch_list_matching mips3 \ | |
910 | !micromips] | |
07147777 | 911 | } |
640c0ccd | 912 | |
16e5e222 RS |
913 | run_dump_test_arches "aent" [mips_arch_list_matching mips1] |
914 | ||
915 | run_dump_test_arches "branch-misc-4" [mips_arch_list_matching mips1] | |
916 | run_dump_test_arches "branch-misc-4-64" [mips_arch_list_matching mips3] | |
917 | ||
918 | run_dump_test_arches "loc-swap" [mips_arch_list_all] | |
919 | run_dump_test_arches "loc-swap-dis" [mips_arch_list_all] | |
920 | run_dump_test_arches "loc-swap-2" [mips_arch_list_all] | |
921 | run_dump_test_arches "loc-swap-3" [mips_arch_list_all] | |
922 | ||
ba92f887 MR |
923 | run_dump_test "nan-legacy-1" |
924 | run_dump_test "nan-legacy-2" | |
925 | run_dump_test "nan-legacy-3" | |
926 | run_dump_test "nan-legacy-4" | |
927 | run_dump_test "nan-legacy-5" | |
928 | ||
929 | run_dump_test "nan-2008-1" | |
930 | run_dump_test "nan-2008-2" | |
931 | run_dump_test "nan-2008-3" | |
932 | run_dump_test "nan-2008-4" | |
933 | ||
934 | run_list_test "nan-error-1" | |
935 | run_list_test "nan-error-2" "-mnan=foo" | |
936 | ||
5e0116d5 | 937 | if $has_newabi { |
a4cb6c4d AO |
938 | run_dump_test "n32-consec" |
939 | } | |
940 | ||
640c0ccd CD |
941 | # tests of objdump's ability to disassemble using different |
942 | # register names. | |
943 | run_dump_test "gpr-names-numeric" | |
944 | run_dump_test "gpr-names-32" | |
945 | run_dump_test "gpr-names-n32" | |
946 | run_dump_test "gpr-names-64" | |
947 | ||
948 | run_dump_test "fpr-names-numeric" | |
949 | run_dump_test "fpr-names-32" | |
950 | run_dump_test "fpr-names-n32" | |
951 | run_dump_test "fpr-names-64" | |
952 | ||
953 | run_dump_test "cp0-names-numeric" | |
f409fd1e MR |
954 | run_dump_test "cp0-names-r3000" |
955 | run_dump_test "cp0-names-r4000" \ | |
956 | { { {name} {(r4000)} } { {objdump} {-M cp0-names=r4000} } } | |
957 | run_dump_test "cp0-names-r4000" \ | |
958 | { { {name} {(r4400)} } { {objdump} {-M cp0-names=r4400} } } | |
640c0ccd | 959 | run_dump_test "cp0-names-mips32" |
af7ee8bf | 960 | run_dump_test "cp0-names-mips32r2" |
640c0ccd | 961 | run_dump_test "cp0-names-mips64" |
5f74bc13 | 962 | run_dump_test "cp0-names-mips64r2" |
640c0ccd | 963 | run_dump_test "cp0-names-sb1" |
af7ee8bf | 964 | |
bbcc0807 CD |
965 | run_dump_test "cp0sel-names-numeric" |
966 | run_dump_test "cp0sel-names-mips32" | |
967 | run_dump_test "cp0sel-names-mips32r2" | |
968 | run_dump_test "cp0sel-names-mips64" | |
5f74bc13 | 969 | run_dump_test "cp0sel-names-mips64r2" |
bbcc0807 CD |
970 | run_dump_test "cp0sel-names-sb1" |
971 | ||
af7ee8bf CD |
972 | run_dump_test "hwr-names-numeric" |
973 | run_dump_test "hwr-names-mips32r2" | |
5f74bc13 | 974 | run_dump_test "hwr-names-mips64r2" |
ecd13cd3 TS |
975 | |
976 | run_dump_test "ldstla-32" | |
2051e8c4 | 977 | run_dump_test "ldstla-32-mips3" |
ecd13cd3 | 978 | run_dump_test "ldstla-32-shared" |
2051e8c4 MR |
979 | run_dump_test "ldstla-32-mips3-shared" |
980 | run_list_test "ldstla-32-1" "-mabi=32" \ | |
981 | "MIPS ld-st-la bad constants (ABI o32)" | |
982 | run_list_test "ldstla-32-mips3-1" "-mabi=32" \ | |
983 | "MIPS ld-st-la bad constants (ABI o32, mips3)" | |
984 | run_list_test "ldstla-32-1" "-KPIC -mabi=32" \ | |
985 | "MIPS ld-st-la bad constants (ABI o32, shared)" | |
986 | run_list_test "ldstla-32-mips3-1" "-KPIC -mabi=32" \ | |
987 | "MIPS ld-st-la bad constants (ABI o32, mips3, shared)" | |
aed1a261 | 988 | run_dump_test "ldstla-eabi64" |
ecd13cd3 | 989 | if $has_newabi { |
ecd13cd3 TS |
990 | run_dump_test "ldstla-n64" |
991 | run_dump_test "ldstla-n64-shared" | |
aed1a261 | 992 | run_dump_test "ldstla-n64-sym32" |
ecd13cd3 | 993 | } |
5fc68419 RS |
994 | |
995 | run_dump_test "macro-warn-1" | |
996 | run_dump_test "macro-warn-2" | |
997 | run_dump_test "macro-warn-3" | |
998 | run_dump_test "macro-warn-4" | |
999 | if $has_newabi { | |
1000 | run_dump_test "macro-warn-1-n32" | |
1001 | run_dump_test "macro-warn-2-n32" | |
1002 | } | |
8fc2e39e TS |
1003 | |
1004 | run_dump_test "noat-1" | |
1005 | run_list_test "noat-2" "" | |
1006 | run_list_test "noat-3" "" | |
1007 | run_list_test "noat-4" "" | |
1008 | run_list_test "noat-5" "" | |
1009 | run_list_test "noat-6" "" | |
1010 | run_list_test "noat-7" "" | |
58e2ea4d | 1011 | |
741fe287 MR |
1012 | run_dump_test "at-1" |
1013 | run_list_test "at-2" "-32 -mips1" "MIPS at-2" | |
1014 | ||
350cc38d MS |
1015 | run_dump_test "loongson-2e" |
1016 | run_dump_test "loongson-2f" | |
c67a084a NC |
1017 | run_dump_test "loongson-2f-2" |
1018 | run_dump_test "loongson-2f-3" | |
61d4e56d | 1019 | |
a471ec3a | 1020 | run_dump_test "loongson-3a" |
98675402 RS |
1021 | run_dump_test "loongson-3a-2" |
1022 | run_dump_test "loongson-3a-3" | |
a471ec3a | 1023 | |
bb35fb24 | 1024 | run_dump_test_arches "octeon" [mips_arch_list_matching octeon] |
dd6a37e7 | 1025 | run_dump_test_arches "octeon-saa-saad" [mips_arch_list_matching octeonp] |
725fc8ed | 1026 | run_list_test_arches "octeon-ill" [mips_arch_list_matching octeon] |
d954098f | 1027 | run_dump_test_arches "octeon-pref" [mips_arch_list_matching octeon] |
432233b3 | 1028 | run_dump_test_arches "octeon2" [mips_arch_list_matching octeon2] |
350cc38d | 1029 | |
0797561a | 1030 | run_dump_test "smartmips" |
03f66e8a MR |
1031 | run_dump_test_arches "mips32-dsp" [mips_arch_list_matching mips32r2 \ |
1032 | !octeon] | |
1033 | run_dump_test_arches "mips32-dspr2" [mips_arch_list_matching mips32r2 \ | |
1034 | !octeon] | |
0797561a AN |
1035 | run_dump_test "mips64-dsp" |
1036 | run_dump_test "mips32-mt" | |
305e06d3 | 1037 | |
16e5e222 RS |
1038 | run_dump_test "mips16-dwarf2" |
1039 | if $has_newabi { | |
1040 | run_dump_test "mips16-dwarf2-n32" | |
0499d65b | 1041 | } |
16e5e222 RS |
1042 | run_dump_test "mips16-stabs" |
1043 | ||
1044 | run_dump_test "mips16e-jrc" | |
1045 | run_dump_test "mips16e-save" | |
1a00e612 | 1046 | run_list_test "mips16e-save-err" "-march=mips32 -32" |
16e5e222 RS |
1047 | run_dump_test "mips16e-64" |
1048 | run_list_test "mips16e-64" "-march=mips32 -32" | |
1049 | run_dump_test "mips16-intermix" | |
1050 | ||
0a44bf69 RS |
1051 | run_dump_test "vxworks1" |
1052 | run_dump_test "vxworks1-xgot" | |
a284cff1 TS |
1053 | run_dump_test "vxworks1-el" |
1054 | run_dump_test "vxworks1-xgot-el" | |
ef75f014 TS |
1055 | |
1056 | run_dump_test "noreorder" | |
49954fb4 | 1057 | run_dump_test "align" |
742a56fe RS |
1058 | run_dump_test "align2" |
1059 | run_dump_test "align2-el" | |
462427c4 | 1060 | run_dump_test "align3" |
c8ab98e0 | 1061 | run_dump_test "odd-float" |
a3f278e2 | 1062 | run_dump_test "ehword" |
f6829a45 AN |
1063 | |
1064 | run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \ | |
1065 | [mips_arch_list_matching mips2] | |
1066 | run_list_test_arches "mips-macro-ill-nofp" "-32 -msoft-float" \ | |
1067 | [mips_arch_list_matching mips2] | |
1068 | ||
1069 | run_list_test_arches "mips-hard-float-flag" \ | |
1070 | "-32 -msoft-float -mhard-float" \ | |
16e5e222 | 1071 | [mips_arch_list_matching mips1 !singlefloat] |
f6829a45 AN |
1072 | run_list_test_arches "mips-double-float-flag" \ |
1073 | "-32 -msingle-float -mdouble-float" \ | |
16e5e222 | 1074 | [mips_arch_list_matching mips1 !singlefloat] |
30c09090 RS |
1075 | |
1076 | run_dump_test "mips16-vis-1" | |
861fb55a | 1077 | run_dump_test "call-nonpic-1" |
5fb8dac1 | 1078 | run_dump_test "mips32-sync" |
f6690563 MR |
1079 | run_dump_test_arches "mips32r2-sync" \ |
1080 | [mips_arch_list_matching mips32r2] | |
8d367dd5 | 1081 | run_dump_test_arches "alnv_ps-swap" [mips_arch_list_matching fpisa5] |
df58fc94 RS |
1082 | run_dump_test_arches "cache" [lsort -dictionary -unique [concat \ |
1083 | [mips_arch_list_matching mips3] \ | |
1084 | [mips_arch_list_matching mips32] ] ] | |
1085 | run_dump_test_arches "daddi" [mips_arch_list_matching mips3] | |
1086 | run_dump_test_arches "pref" [lsort -dictionary -unique [concat \ | |
1087 | [mips_arch_list_matching mips4] \ | |
1088 | [mips_arch_list_matching mips32] ] ] | |
5fb8dac1 | 1089 | |
a79558d9 | 1090 | if $has_newabi { run_dump_test "cfi-n64-1" } |
f77ef3e2 RS |
1091 | |
1092 | run_dump_test "pr12915" | |
4c260379 RS |
1093 | run_dump_test "reginfo-1a" |
1094 | run_dump_test "reginfo-1b" | |
df58fc94 | 1095 | |
16e5e222 RS |
1096 | run_dump_test "micromips" |
1097 | run_dump_test "micromips-trap" | |
833794fc MR |
1098 | run_dump_test "micromips-insn32" |
1099 | run_dump_test "micromips-noinsn32" | |
1100 | run_list_test "micromips" "-mips32r2 -32 -mfp64 -minsn32" \ | |
1101 | "microMIPS for MIPS32r2 (instructions invalid in insn32 mode)" | |
16e5e222 RS |
1102 | run_list_test "micromips-size-0" \ |
1103 | "-32 -march=mips64 -mmicromips" "microMIPS instruction size 0" | |
1104 | run_dump_test "micromips-size-1" | |
1105 | run_dump_test "micromips-branch-relax" | |
1106 | run_dump_test "micromips-branch-relax-pic" | |
1107 | run_dump_test "micromips-branch-delay" | |
1108 | run_dump_test "micromips-warn-branch-delay" | |
1109 | run_dump_test "micromips-warn-branch-delay-1" | |
1110 | run_dump_test "micromips-b16" | |
a92713e6 | 1111 | run_list_test "micromips-ill" |
dec0624d MR |
1112 | |
1113 | run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \ | |
1114 | !octeon] | |
1976c292 RS |
1115 | run_dump_test_arches "hilo-diff-eb" [mips_arch_list_all] |
1116 | run_dump_test_arches "hilo-diff-el" [mips_arch_list_all] | |
1117 | if $has_newabi { | |
1118 | run_dump_test_arches "hilo-diff-eb-n32" [mips_arch_list_matching mips3] | |
1119 | run_dump_test_arches "hilo-diff-el-n32" [mips_arch_list_matching mips3] | |
1120 | run_dump_test_arches "hilo-diff-eb-n64" [mips_arch_list_matching mips3] | |
1121 | run_dump_test_arches "hilo-diff-el-n64" [mips_arch_list_matching mips3] | |
1122 | } | |
5821951c MR |
1123 | run_dump_test_arches "lui" [mips_arch_list_matching mips1] |
1124 | run_list_test_arches "lui-1" "-32" [mips_arch_list_matching mips1] | |
1125 | run_list_test_arches "lui-2" "-32" [mips_arch_list_matching mips1] | |
e407c74b NC |
1126 | |
1127 | run_dump_test "r5900" | |
1128 | run_dump_test "r5900-full" | |
16e5e222 | 1129 | run_list_test "r5900-nollsc" "-mabi=o64 -march=r5900" |
c77c0862 | 1130 | run_dump_test "r5900-vu0" |
14daeee3 RS |
1131 | run_dump_test "r5900-full-vu0" |
1132 | run_dump_test "r5900-all-vu0" | |
1133 | run_list_test "r5900-error-vu0" "-march=r5900" | |
a5163986 CF |
1134 | |
1135 | run_list_test_arches "ext-ill" [mips_arch_list_matching mips64r2] | |
c6278170 RS |
1136 | |
1137 | run_list_test "ase-errors-1" "-mabi=32 -march=mips1" "ASE errors (1)" | |
1138 | run_list_test "ase-errors-2" "-mabi=o64 -march=mips3" "ASE errors (2)" | |
1139 | run_list_test "ase-errors-3" "-mabi=32 -march=mips1" "ASE errors (3)" | |
1140 | run_list_test "ase-errors-4" "-mabi=o64 -march=mips3" "ASE errors (4)" | |
f2ae14a1 RS |
1141 | |
1142 | run_dump_test_arches "la-reloc" [mips_arch_list_matching mips1] | |
1143 | if { $has_newabi } { | |
1144 | run_dump_test_arches "dla-reloc" [mips_arch_list_matching mips3] | |
1145 | } | |
1146 | ||
1147 | # Start with MIPS II to avoid load delay nops. | |
1148 | run_dump_test_arches "ld-reloc" [mips_arch_list_matching mips2] | |
1149 | run_dump_test_arches "ulw-reloc" [mips_arch_list_matching mips2] | |
1150 | run_dump_test_arches "ulh-reloc" [mips_arch_list_matching mips2] | |
1151 | ||
1152 | run_dump_test "l_d-reloc" | |
6f72df77 | 1153 | run_list_test "bltzal" |
ec0c61e3 CF |
1154 | |
1155 | run_dump_test_arches "msa" [mips_arch_list_matching mips32r2] | |
1156 | run_dump_test_arches "msa64" [mips_arch_list_matching mips64r2] | |
1157 | run_dump_test_arches "msa-relax" [mips_arch_list_matching mips32r2] | |
cbfebe3c | 1158 | run_dump_test_arches "msa-branch" [mips_arch_list_matching mips32r2] |
252b5132 | 1159 | } |