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