1 # Copyright (C) 2012-2016 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 # Some generic MIPS tests
21 # When adding a new test to this file, try to do the following things:
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).
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."
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.
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.
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:
49 # displayname: The name of the entry to be used for pretty-printing.
51 # gprsize: The size in bits of General Purpose Registers provided by
52 # the architecture (must be 32 or 64).
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)
63 # mips1, mips2, mips3, mips4, mips5, mips32, mips64
64 # The architecture includes the instructions defined
67 # fpisa3, fpisa4, fpisa5
68 # The architecture includes the floating-point
69 # instructions defined by that MIPS ISA.
72 # The architecture interlocks GPRs accesses. (That is,
73 # there are no load delay slots.)
75 # mips3d The architecture includes the MIPS-3D ASE.
77 # ror The architecture includes hardware rotate instructions.
80 # The architecture provides 32- or 64-bit General Purpose
84 # The CPU is 64 bit, but only supports 32 bit FPU.
87 # The CPU doesn't support ll, sc, lld and scd instructions.
90 # The CPU has odd-numbered single-precision registers
91 # available and GAS enables use of them by default.
93 # as_flags: The assembler flags used when assembling tests for this
96 # objdump_flags: The objdump flags used when disassembling tests for
99 # Most entries in the architecture array will have values in all of
100 # the fields above. One entry, "default" represents the default CPU
101 # based on the target of the assembler being built. If always has
102 # empty "as_flags" and "objdump_flags."
106 # This function initializes the architecture data array ("mips_arches")
108 proc mips_arch_init {} {
111 # Catch because the variable won't be set the first time through.
112 catch {unset mips_arches}
115 # mips_arch_create ARCH GPRSIZE EXTENDS PROPS AS_FLAGS OBJDUMP_FLAGS \
116 # (optional:) DEFAULT_FOR_TARGETS
118 # This function creates a new entry in the architecture data array,
119 # for the architecture or CPU named ARCH, and fills in the entry
120 # according to the rest of the arguments.
122 # The new entry's property list is initialized to contain ARCH, any
123 # properties specified by PROPS, and the properties associated with
124 # the entry specified by EXTENDS. (The new architecture is considered
125 # to extend the capabilities provided by that architecture.)
127 # If DEFAULT_FOR_TARGETS is specified, it is a list of targets for which
128 # this architecture is the default architecture. If "istarget" returns
129 # true for any of the targets in the list, a "default" entry will be
130 # added to the architecture array which indicates that ARCH is the default
132 proc mips_arch_create {arch gprsize extends props as_flags objdump_flags
133 {default_for_targets {}}} {
136 if { [info exists mips_arches($arch)] } {
137 error "mips_arch_create: arch \"$arch\" already exists"
139 if { $gprsize != 32 && $gprsize != 64 } {
140 error "mips_arch_create: invalid GPR size $gprsize"
143 set archdata(displayname) $arch
144 set archdata(gprsize) $gprsize
145 set archdata(as_flags) $as_flags
146 set archdata(objdump_flags) $objdump_flags
147 set archdata(props) $arch
148 eval lappend archdata(props) $props
149 if { [string length $extends] != 0 } {
150 eval lappend archdata(props) [mips_arch_properties $extends 0]
153 set mips_arches($arch) [array get archdata]
155 # Set as default if appropriate.
156 foreach target $default_for_targets {
157 if { [istarget $target] } {
158 if { [info exists mips_arches(default)] } {
159 error "mips_arch_create: default arch already exists"
162 set archdata(displayname) "default = $arch"
163 set archdata(as_flags) ""
164 set archdata(objdump_flags) ""
166 set mips_arches(default) [array get archdata]
172 # mips_arch_destroy ARCH
174 # The opposite of the above. This function removes an entry from
175 # the architecture data array, for the architecture or CPU named ARCH.
177 proc mips_arch_destroy {arch} {
180 if { [info exists mips_arches($arch)] } {
181 unset mips_arches($arch)
187 # This function returns the list of all names of entries in the
188 # architecture data array (including the default entry, if a default
190 proc mips_arch_list_all {} {
192 return [lsort -dictionary [array names mips_arches]]
195 # mips_arch_data ARCH
197 # This function returns the information associated with ARCH
198 # in the architecture data array, in "array get" form.
199 proc mips_arch_data {arch} {
202 if { ! [info exists mips_arches($arch)] } {
203 error "mips_arch_data: unknown arch \"$arch\""
205 return $mips_arches($arch)
208 # mips_arch_displayname ARCH
210 # This function returns the printable name associated with ARCH in
211 # the architecture data array.
212 proc mips_arch_displayname {arch} {
213 array set archdata [mips_arch_data $arch]
214 return $archdata(displayname)
217 # mips_arch_properties ARCH (optional:) INCLUDE_GPRSIZE
219 # This function returns the property list associated with ARCH in the
220 # architecture data array, including the "canonical" target name as the
223 # If INCLUDE_GPRSIZE is non-zero, an additional "gpr32" or "gpr64"
224 # property will be returned as part of the list based on the
225 # architecture's GPR size.
226 proc mips_arch_properties {arch {include_gprsize 1}} {
227 array set archdata [mips_arch_data $arch]
228 set props $archdata(props)
229 if { $include_gprsize } {
230 lappend props gpr$archdata(gprsize)
235 # mips_arch_as_flags ARCH
237 # This function returns the assembler flags associated with ARCH in
238 # the architecture data array.
239 proc mips_arch_as_flags {arch} {
240 array set archdata [mips_arch_data $arch]
241 return $archdata(as_flags)
244 # mips_arch_objdump_flags ARCH
246 # This function returns the objdump disassembly flags associated with
247 # ARCH in the architecture data array.
248 proc mips_arch_objdump_flags {arch} {
249 array set archdata [mips_arch_data $arch]
250 return $archdata(objdump_flags)
253 # mips_arch_matches ARCH PROPMATCHLIST
255 # This function returns non-zero if ARCH matches the set of properties
256 # described by PROPMATCHLIST. Each entry in PROPMATCHLIST can either
257 # be the name of a property which must be matched, or "!" followed by
258 # the name of a property which must not be matched. ARCH matches
259 # PROPMATCHLIST if and only if all of the conditions specified by
260 # PROPMATCHLIST are satisfied.
261 proc mips_arch_matches {arch propmatchlist} {
262 foreach pm $propmatchlist {
263 if { [string match {!*} $pm] } {
266 set p [string range $pm 1 end]
268 # fail if not present.
273 set loc [lsearch -exact [mips_arch_properties $arch] $p]
275 # required-absent and found, or required-present and not found: fail.
276 if { ($inverted && $loc != -1) || (! $inverted && $loc == -1) } {
283 # mips_arch_list_matching ARGS
285 # This function returns a list of all architectures which match
286 # the conditions described by its arguments. Its arguments are
287 # taken as a list and used as the PROPMATCHLIST in a call to
288 # "mips_arch_matches" for each known architecture.
289 proc mips_arch_list_matching {args} {
291 foreach arch [mips_arch_list_all] {
292 # For now, don't match default arch until we know what its
293 # properties actually are.
294 if { [string compare $arch default] == 0
295 && [string length [mips_arch_properties default]] == 0} {
298 if { [mips_arch_matches $arch $args] } {
306 # The functions below facilitate running various types of tests.
308 # run_dump_test_arch NAME OPTS ARCH
310 # Invoke "run_dump_test" for test NAME with additional assembler options OPTS.
311 # Add the assembler and disassembler flags that are associated with
314 # You can override the expected output for particular architectures.
315 # The possible test names are, in order of preference:
320 # where CARCH is the "canonical" name of architecture ARCH as recorded
321 # in its associated property list.
322 proc run_dump_test_arch { name opts arch } {
325 set proparch [lindex [mips_arch_properties $arch 0] 0]
326 set prefixes [list ${proparch}@ ]
327 if { [ string match "octeon*" $proparch ] && $proparch != "octeon" } {
328 lappend prefixes octeon@
330 if { [ string match "mips*r6" $proparch ]} {
331 lappend prefixes mipsr6@
333 foreach prefix ${prefixes} {
334 set archname ${prefix}${name}
335 if { [file exists "$srcdir/$subdir/${archname}.d"] } {
341 if [catch {run_dump_test $name \
342 "{name {([concat $opts [mips_arch_displayname $arch]])}}
343 {objdump {[mips_arch_objdump_flags $arch]}}
344 {as {[concat $opts [mips_arch_as_flags $arch]]}}"} rv] {
346 untested "$subdir/$name ($arch)"
350 # run_dump_test_arches NAME [OPTS] ARCH_LIST
352 # Invoke "run_dump_test_arch" for test NAME, for each architecture
353 # listed in ARCH_LIST. OPTS, if specified, is a list of additional
354 # assembler options that should be used for all architectures.
355 proc run_dump_test_arches { name args } {
357 if { [llength $args] > 1 } {
358 set opts [lindex $args 0]
359 set args [lrange $args 1 end]
361 set arch_list [lindex $args 0]
362 foreach arch $arch_list {
363 run_dump_test_arch $name $opts $arch
367 # run_list_test_arch NAME OPTS ARCH
369 # Invoke "run_list_test" for test NAME with additional assembler options OPTS.
370 # Add the assembler flags that are associated with architecture ARCH.
371 proc run_list_test_arch { name opts arch } {
374 set testname "MIPS $name ([concat $opts [mips_arch_displayname $arch]])"
375 set proparch [lindex [mips_arch_properties $arch 0] 0]
376 set prefixes [list ${proparch}@ ]
377 if { [ string match "octeon*" $proparch ] && $proparch != "octeon" } {
378 lappend prefixes octeon@
380 if { [ string match "mips*r6" $proparch ]} {
381 lappend prefixes mipsr6@
383 foreach prefix ${prefixes} {
384 set archname ${prefix}${name}
385 if { [file exists "$srcdir/$subdir/${archname}.l"] } {
391 if [catch {run_list_test \
393 [concat $opts [mips_arch_as_flags $arch]] \
400 # run_list_test_arches NAME [OPTS] ARCH_LIST
402 # Invoke "run_list_test_arch" for test NAME, for each architecture listed
403 # in ARCH_LIST. OPTS, if specified, is a list of additional assembler
404 # options that should be used for all architectures.
405 proc run_list_test_arches { name args } {
407 if { [llength $args] > 1 } {
408 set opts [lindex $args 0]
409 set args [lrange $args 1 end]
411 set arch_list [lindex $args 0]
412 foreach arch $arch_list {
413 run_list_test_arch "$name" "$opts" "$arch"
418 # Create the architecture data array by providing data for all
419 # known architectures.
421 # Note that several targets pick default CPU based on ABI. We
422 # can't easily handle that; do NOT list those targets as defaulting
423 # to any architecture.
425 mips_arch_create mips1 32 {} {} \
426 { -march=mips1 -mtune=mips1 } { -mmips:3000 }
427 mips_arch_create mips2 32 mips1 { gpr_ilocks } \
428 { -march=mips2 -mtune=mips2 } { -mmips:6000 }
429 mips_arch_create mips3 64 mips2 { fpisa3 } \
430 { -march=mips3 -mtune=mips3 } { -mmips:4000 }
431 mips_arch_create mips4 64 mips3 { fpisa4 } \
432 { -march=mips4 -mtune=mips4 } { -mmips:8000 }
433 mips_arch_create mips5 64 mips4 { fpisa5 } \
434 { -march=mips5 -mtune=mips5 } { -mmips:mips5 }
435 mips_arch_create mips32 32 mips2 {} \
436 { -march=mips32 -mtune=mips32 } { -mmips:isa32 } \
437 { mipsisa32-*-* mipsisa32el-*-* }
438 mips_arch_create mips32r2 32 mips32 { fpisa3 fpisa4 fpisa5 ror } \
439 { -march=mips32r2 -mtune=mips32r2 } \
441 { mipsisa32r2-*-* mipsisa32r2el-*-* }
442 mips_arch_create mips32r3 32 mips32r2 { fpisa3 fpisa4 fpisa5 ror } \
443 { -march=mips32r3 -mtune=mips32r3 } \
445 { mipsisa32r3-*-* mipsisa32r3el-*-* }
446 mips_arch_create mips32r5 32 mips32r3 { fpisa3 fpisa4 fpisa5 ror } \
447 { -march=mips32r5 -mtune=mips32r5 } \
449 { mipsisa32r5-*-* mipsisa32r5el-*-* }
450 mips_arch_create mips32r6 32 mips32r5 { fpisa3 fpisa4 fpisa5 ror } \
451 { -march=mips32r6 -mtune=mips32r6 --defsym r6=} \
453 { mipsisa32r6-*-* mipsisa32r6el-*-* }
454 mips_arch_create mips64 64 mips5 { mips32 } \
455 { -march=mips64 -mtune=mips64 } { -mmips:isa64 } \
456 { mipsisa64-*-* mipsisa64el-*-* }
457 mips_arch_create mips64r2 64 mips64 { mips32r2 ror } \
458 { -march=mips64r2 -mtune=mips64r2 } \
460 { mipsisa64r2-*-* mipsisa64r2el-*-* }
461 mips_arch_create mips64r3 64 mips64r2 { mips32r3 ror } \
462 { -march=mips64r3 -mtune=mips64r3 } \
464 { mipsisa64r3-*-* mipsisa64r3el-*-* }
465 mips_arch_create mips64r5 64 mips64r3 { mips32r5 ror } \
466 { -march=mips64r5 -mtune=mips64r5 } \
468 { mipsisa64r5-*-* mipsisa64r5el-*-* }
469 mips_arch_create mips64r6 64 mips64r5 { mips32r6 ror } \
470 { -march=mips64r6 -mtune=mips64r6 --defsym r6=} \
472 { mipsisa64r6-*-* mipsisa64r6el-*-* }
473 mips_arch_create mips16 32 {} {} \
474 { -march=mips1 -mips16 } { -mmips:16 }
475 mips_arch_create micromips 64 mips64r2 {} \
476 { -march=mips64r2 -mmicromips } {}
477 mips_arch_create r3000 32 mips1 {} \
478 { -march=r3000 -mtune=r3000 } { -mmips:3000 }
479 mips_arch_create r3900 32 mips1 { gpr_ilocks } \
480 { -march=r3900 -mtune=r3900 } { -mmips:3900 } \
481 { mipstx39-*-* mipstx39el-*-* }
482 mips_arch_create r4000 64 mips3 {} \
483 { -march=r4000 -mtune=r4000 } { -mmips:4000 }
484 mips_arch_create vr5400 64 mips4 { ror } \
485 { -march=vr5400 -mtune=vr5400 } { -mmips:5400 }
486 mips_arch_create sb1 64 mips64 { mips3d oddspreg } \
487 { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
488 { mipsisa64sb1-*-* mipsisa64sb1el-*-* }
489 mips_arch_create octeon 64 mips64r2 { oddspreg } \
490 { -march=octeon -mtune=octeon } { -mmips:octeon } \
491 { mips64octeon*-*-* }
492 mips_arch_create octeonp 64 octeon { oddspreg } \
493 { -march=octeon+ -mtune=octeon+ } { -mmips:octeon+ } \
495 mips_arch_create octeon2 64 octeonp { oddspreg } \
496 { -march=octeon2 -mtune=octeon2 } { -mmips:octeon2 } \
498 mips_arch_create octeon3 64 octeon2 { oddspreg } \
499 { -march=octeon3 -mtune=octeon3 } { -mmips:octeon3 } \
501 mips_arch_create xlr 64 mips64 { oddspreg } \
502 { -march=xlr -mtune=xlr } { -mmips:xlr }
503 mips_arch_create r5900 64 mips3 { gpr_ilocks singlefloat nollsc } \
504 { -march=r5900 -mtune=r5900 } { -mmips:5900 } \
505 { mipsr5900el-*-* mips64r5900el-*-* }
508 # And now begin the actual tests! VxWorks uses RELA rather than REL
509 # relocations, so most of the generic dump tests will not work there.
511 if { [istarget mips*-*-vxworks*] } {
512 run_dump_test "vxworks1"
513 run_dump_test "vxworks1-xgot"
514 run_dump_test "vxworks1-el"
515 run_dump_test "vxworks1-xgot-el"
517 run_list_test "option-pic-vxworks-1" "-mvxworks-pic" \
518 "MIPS invalid PIC option in VxWorks PIC"
519 run_list_test "option-pic-vxworks-2" "-mvxworks-pic" \
520 "MIPS invalid switch to SVR4 PIC from VxWorks PIC"
521 } elseif { [istarget mips*-*-*] } {
522 set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] \
523 || [istarget mipsisa32-*-linux*] || [istarget mipsisa32el-*-linux*]]
524 set has_newabi [expr [istarget *-*-irix6*] || [istarget mips*-*-linux*] \
525 || [istarget mips*-sde-elf*] || [istarget mips*-mti-elf*] \
526 || [istarget mips*-img-elf*]]
528 if { [istarget "mips*-*-*linux*"]
529 || [istarget "mips*-sde-elf*"]
530 || [istarget "mips*-mti-elf*"]
531 || [istarget "mips*-img-elf*"]
532 || [istarget "mips*-*-*bsd*"] } then {
537 if [istarget mips*el-*-*] {
543 run_dump_test_arches "dot-1" [mips_arch_list_matching mips1]
544 run_dump_test_arches "abs" [mips_arch_list_matching mips1]
545 run_dump_test_arches "add" [mips_arch_list_matching mips1]
546 run_dump_test_arches "and" [mips_arch_list_matching mips1]
547 run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1]
548 run_list_test_arches "mips1-fp" "-32 -msoft-float" \
549 [mips_arch_list_matching mips1]
550 run_dump_test "break20"
551 run_dump_test "trap20"
553 run_dump_test_arches "beq" [mips_arch_list_matching mips1]
554 run_dump_test_arches "bge" [mips_arch_list_matching mips1]
555 run_dump_test_arches "bgeu" [mips_arch_list_matching mips1]
556 run_dump_test_arches "blt" [mips_arch_list_matching mips1]
557 run_dump_test_arches "bltu" [mips_arch_list_matching mips1]
558 run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2 !mips32r6]
559 run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
560 run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1]
561 run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1]
562 run_dump_test_arches "branch-misc-2-64" [mips_arch_list_matching mips3]
563 run_dump_test_arches "branch-misc-2pic-64" [mips_arch_list_matching mips3]
564 run_dump_test "branch-misc-3"
565 run_dump_test "branch-swap"
567 # Sweep a range of branch offsets so that it hits a position where
568 # it is at the beginning of a frag and then swapped with a 16-bit
569 # instruction from the preceding frag. The offset will be somewhere
570 # close below 4096 as this is the default obstack size limit that
571 # we use and some space will have been already consumed. The exact
572 # amount depends on the host's programming model.
573 for { set count 960 } { $count <= 1024 } { incr count } {
574 run_list_test "branch-swap-2" "--defsym count=$count" \
575 "MIPS branch swapping ($count)"
578 run_dump_test "branch-section-1"
579 run_dump_test "branch-section-2"
580 run_dump_test "branch-section-3"
581 run_dump_test "branch-section-4"
582 run_dump_test "branch-extern-1"
583 run_dump_test "branch-extern-2"
584 run_dump_test "branch-extern-3"
585 run_dump_test "branch-extern-4"
586 run_dump_test "branch-weak-1"
587 run_dump_test "branch-weak-2"
588 run_dump_test "branch-weak-3"
589 run_dump_test "branch-weak-4"
590 run_dump_test "branch-weak-5"
592 run_dump_test "compact-eh-eb-1"
593 run_dump_test "compact-eh-eb-2"
594 run_dump_test "compact-eh-eb-3"
595 run_dump_test "compact-eh-eb-4"
596 run_dump_test "compact-eh-eb-5"
597 run_dump_test "compact-eh-eb-6"
598 run_dump_test "compact-eh-eb-7"
599 run_dump_test "compact-eh-el-1"
600 run_dump_test "compact-eh-el-2"
601 run_dump_test "compact-eh-el-3"
602 run_dump_test "compact-eh-el-4"
603 run_dump_test "compact-eh-el-5"
604 run_dump_test "compact-eh-el-6"
605 run_dump_test "compact-eh-el-7"
606 run_list_test "compact-eh-err1"
607 run_list_test "compact-eh-err2"
612 run_dump_test_arches "dli" [mips_arch_list_matching mips3]
614 run_dump_test_arches "jal" [mips_arch_list_matching mips1]
615 run_dump_test_arches "jal-mask-11" [mips_arch_list_matching mips1]
616 run_dump_test_arches "jal-mask-12" [mips_arch_list_matching mips1]
617 run_dump_test_arches "jal-mask-21" [mips_arch_list_matching micromips]
618 run_dump_test_arches "jal-mask-22" [mips_arch_list_matching micromips]
619 run_dump_test "eret-1"
620 run_dump_test "eret-2"
621 run_dump_test "eret-3"
622 run_dump_test_arches "fix-rm7000-1" \
623 [mips_arch_list_matching mips3 !singlefloat \
625 run_dump_test_arches "fix-rm7000-2" \
626 [mips_arch_list_matching mips3 !singlefloat \
628 run_dump_test_arches "24k-branch-delay-1" \
629 [mips_arch_list_matching mips1]
630 run_dump_test_arches "24k-triple-stores-1" \
631 [mips_arch_list_matching fpisa5 !octeon]
632 run_dump_test_arches "24k-triple-stores-2" \
633 [mips_arch_list_matching mips2]
634 run_dump_test_arches "24k-triple-stores-2-llsc" \
635 [mips_arch_list_matching mips2 !nollsc]
636 run_dump_test_arches "24k-triple-stores-3" \
637 [mips_arch_list_matching mips2]
638 run_dump_test_arches "24k-triple-stores-4" \
639 [mips_arch_list_matching mips2 !singlefloat]
640 run_dump_test_arches "24k-triple-stores-5" \
641 [mips_arch_list_matching mips1]
642 run_dump_test_arches "24k-triple-stores-6" \
643 [mips_arch_list_matching mips2 !singlefloat]
644 run_dump_test_arches "24k-triple-stores-7" \
645 [mips_arch_list_matching mips2 !singlefloat]
646 run_dump_test_arches "24k-triple-stores-8" \
647 [mips_arch_list_matching mips1]
648 run_dump_test_arches "24k-triple-stores-9" \
649 [mips_arch_list_matching mips1]
650 run_dump_test_arches "24k-triple-stores-10" \
651 [mips_arch_list_matching mips1]
652 run_dump_test_arches "24k-triple-stores-11" \
653 [mips_arch_list_matching mips1]
655 run_dump_test_arches "jal-svr4pic" [mips_arch_list_matching mips1]
656 run_dump_test_arches "jal-svr4pic-noreorder" \
657 [mips_arch_list_matching mips1]
658 run_dump_test "jal-xgot"
659 run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]
660 if $has_newabi { run_dump_test "jal-newabi" }
662 run_dump_test "la-svr4pic"
663 run_dump_test "la-xgot"
664 run_dump_test "lca-svr4pic"
665 run_dump_test "lca-xgot"
666 # XXX FIXME: Has mips2 and later insns with mips1 disassemblies.
667 # (Should split and then use appropriate arch lists.)
668 run_dump_test_arches "lb" [mips_arch_list_matching mips1 !mips2]
669 run_dump_test_arches "lb-svr4pic" \
670 [mips_arch_list_matching mips1 !gpr_ilocks]
671 run_dump_test_arches "lb-svr4pic-ilocks" [mips_arch_list_matching gpr_ilocks]
672 # Both versions specify the cpu, so we can run both regardless of
673 # the interlocking in the configured default cpu.
674 run_dump_test "lb-xgot"
675 run_dump_test "lb-xgot-ilocks"
676 run_dump_test_arches "ld" [mips_arch_list_matching mips1]
677 run_dump_test_arches "ld-forward" [mips_arch_list_matching mips1]
678 run_dump_test_arches "sd" [mips_arch_list_matching mips1]
679 run_dump_test_arches "sd-forward" [mips_arch_list_matching mips1]
680 run_dump_test_arches "l_d" [mips_arch_list_matching mips1 !singlefloat]
681 run_dump_test_arches "l_d-single" [mips_arch_list_matching mips1 singlefloat]
682 run_dump_test_arches "l_d-forward" [mips_arch_list_matching mips1 !singlefloat]
683 run_dump_test_arches "s_d" [mips_arch_list_matching mips1 !singlefloat]
684 run_dump_test_arches "s_d-single" [mips_arch_list_matching mips1 singlefloat]
685 run_dump_test_arches "s_d-forward" [mips_arch_list_matching mips1 !singlefloat]
686 run_dump_test_arches "ldc1" [mips_arch_list_matching mips2 !singlefloat]
687 run_dump_test_arches "ldc1-forward" [mips_arch_list_matching mips2 !singlefloat]
688 run_dump_test_arches "sdc1" [mips_arch_list_matching mips2 !singlefloat]
689 run_dump_test_arches "sdc1-forward" [mips_arch_list_matching mips2 !singlefloat]
691 run_dump_test_arches "ld-n32" [mips_arch_list_matching mips3]
692 run_dump_test_arches "ld-forward-n32" \
693 [mips_arch_list_matching mips3]
694 run_dump_test_arches "sd-n32" [mips_arch_list_matching mips3]
695 run_dump_test_arches "sd-forward-n32" \
696 [mips_arch_list_matching mips3]
697 run_dump_test_arches "l_d-n32" [mips_arch_list_matching mips3 !singlefloat]
698 run_dump_test_arches "l_d-forward-n32" \
699 [mips_arch_list_matching mips3 !singlefloat]
700 run_dump_test_arches "s_d-n32" [mips_arch_list_matching mips3 !singlefloat]
701 run_dump_test_arches "s_d-forward-n32" \
702 [mips_arch_list_matching mips3 !singlefloat]
703 run_dump_test_arches "ldc1-n32" [mips_arch_list_matching mips3 !singlefloat]
704 run_dump_test_arches "ldc1-forward-n32" \
705 [mips_arch_list_matching mips3 !singlefloat]
706 run_dump_test_arches "sdc1-n32" [mips_arch_list_matching mips3 !singlefloat]
707 run_dump_test_arches "sdc1-forward-n32" \
708 [mips_arch_list_matching mips3 !singlefloat]
709 run_dump_test_arches "ld-n64" [mips_arch_list_matching mips3]
710 run_dump_test_arches "ld-forward-n64" \
711 [mips_arch_list_matching mips3]
712 run_dump_test_arches "sd-n64" [mips_arch_list_matching mips3]
713 run_dump_test_arches "sd-forward-n64" \
714 [mips_arch_list_matching mips3]
715 run_dump_test_arches "l_d-n64" [mips_arch_list_matching mips3 !singlefloat]
716 run_dump_test_arches "l_d-forward-n64" \
717 [mips_arch_list_matching mips3 !singlefloat]
718 run_dump_test_arches "s_d-n64" [mips_arch_list_matching mips3 !singlefloat]
719 run_dump_test_arches "s_d-forward-n64" \
720 [mips_arch_list_matching mips3 !singlefloat]
721 run_dump_test_arches "ldc1-n64" [mips_arch_list_matching mips3 !singlefloat]
722 run_dump_test_arches "ldc1-forward-n64" \
723 [mips_arch_list_matching mips3 !singlefloat]
724 run_dump_test_arches "sdc1-n64" [mips_arch_list_matching mips3 !singlefloat]
725 run_dump_test_arches "sdc1-forward-n64" \
726 [mips_arch_list_matching mips3 !singlefloat]
728 run_dump_test_arches "ld-zero" [mips_arch_list_matching mips1]
729 run_dump_test_arches "ld-zero-2" [mips_arch_list_matching mips2 !nollsc]
730 run_dump_test_arches "ld-zero-3" [mips_arch_list_matching mips3 !nollsc]
731 run_dump_test_arches "ld-zero-u" [mips_arch_list_matching micromips]
732 run_dump_test_arches "ld-zero-q" [mips_arch_list_matching r5900]
733 run_dump_test "ld-svr4pic"
734 run_dump_test "ld-xgot"
735 run_dump_test_arches "li" [mips_arch_list_matching mips1]
736 run_dump_test "lifloat"
737 run_dump_test "lif-svr4pic"
738 run_dump_test "lif-xgot"
739 run_dump_test_arches "mips4" [mips_arch_list_matching mips4]
740 run_dump_test_arches "mips4-fp" "-32" \
741 [mips_arch_list_matching fpisa4]
742 run_dump_test_arches "mips4-fp" "-mabi=o64" \
743 [mips_arch_list_matching fpisa4 gpr64]
744 run_list_test_arches "mips4-fp" "-32 -msoft-float" \
745 [mips_arch_list_matching fpisa4]
746 run_dump_test_arches "mips4-branch-likely" \
747 [mips_arch_list_matching mips4 !mips32r6]
748 run_list_test_arches "mips4-branch-likely" "-32 -msoft-float" \
749 [mips_arch_list_matching mips4 !mips32r6]
750 run_dump_test_arches "mips5-fp" "-32" \
751 [mips_arch_list_matching fpisa5]
752 run_dump_test_arches "mips5-fp" "-mabi=o64" \
753 [mips_arch_list_matching fpisa5 gpr64]
756 run_dump_test_arches "rol" [mips_arch_list_matching mips1 !ror]
757 run_dump_test_arches "rol-hw" [mips_arch_list_matching ror]
759 run_dump_test_arches "rol64" [mips_arch_list_matching gpr64 !ror]
760 run_dump_test_arches "rol64-hw" [mips_arch_list_matching gpr64 ror]
763 run_dump_test_arches "sdata-gp" [mips_arch_list_matching mips1]
764 run_dump_test "trunc"
766 run_dump_test_arches "ulh2-eb" [mips_arch_list_matching mips1 !mips32r6]
767 run_dump_test_arches "ulh2-el" [mips_arch_list_matching mips1 !mips32r6]
768 run_dump_test "ulh-svr4pic"
769 run_dump_test "ulh-xgot"
775 run_dump_test_arches "ulw2-eb" [mips_arch_list_matching mips1 !gpr_ilocks \
777 run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks \
779 run_dump_test_arches "ulw2-el" [mips_arch_list_matching mips1 !gpr_ilocks \
781 run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks \
784 run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3 !mips32r6]
785 run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3 !mips32r6]
787 run_dump_test "mips16"
788 run_dump_test "mips16-64"
789 run_dump_test "mips16-macro"
790 # Check MIPS16e extensions
791 run_dump_test_arches "mips16e" [mips_arch_list_matching mips32 !micromips \
793 # Check jalx handling
794 run_dump_test "mips16-jalx"
795 run_dump_test "mips-jalx"
796 run_dump_test "mips-jalx-2"
797 # Check MIPS16 HI16/LO16 relocations
798 run_dump_test "mips16-hilo"
800 run_dump_test "mips16-hilo-n32"
802 run_dump_test "mips16-hilo-match"
803 run_dump_test "delay"
804 run_dump_test "nodelay"
805 run_dump_test "mips4010"
806 run_dump_test "mips4650"
807 run_dump_test "mips4100"
808 run_dump_test "vr4111"
809 run_dump_test "vr4120"
810 run_dump_test "vr4120-2"
811 run_dump_test "vr4130"
812 run_dump_test "vr5400"
813 run_list_test "vr5400-ill" "-march=vr5400"
814 run_dump_test "vr5500"
815 run_dump_test "rm7000"
816 run_dump_test "perfcount"
817 run_dump_test "lineno"
820 run_dump_test_arches "virt" [mips_arch_list_matching mips32r2]
821 run_dump_test_arches "virt64" [mips_arch_list_matching mips64r2]
823 run_dump_test_arches "mips32" [mips_arch_list_matching mips32]
824 run_dump_test_arches "mips32-imm" [mips_arch_list_matching mips32]
826 run_dump_test_arches "mips32-sf32" [mips_arch_list_matching mips32]
827 run_list_test_arches "mips32-sf32" "-32 -msoft-float" \
828 [mips_arch_list_matching mips32]
829 run_dump_test_arches "mips32-cp2" [mips_arch_list_matching mips32 \
832 run_dump_test_arches "mips32r2" [mips_arch_list_matching mips32r2]
833 run_dump_test_arches "mips32r2-cp2" [mips_arch_list_matching mips32r2 \
835 run_dump_test_arches "mips32r2-fp32" \
836 [mips_arch_list_matching mips32r2]
837 run_list_test_arches "mips32r2-fp32" "-32 -msoft-float" \
838 [mips_arch_list_matching mips32r2]
839 run_list_test_arches "mips32r2-ill" "-32" \
840 [mips_arch_list_matching mips32r2 gpr32]
841 run_list_test_arches "mips32r2-ill-fp64" "-mabi=o64" \
842 [mips_arch_list_matching mips32r2 gpr64]
843 run_list_test_arches "mips32r2-ill-nofp" "-32 -msoft-float" \
844 [mips_arch_list_matching mips32r2]
846 run_dump_test_arches "mips64" [mips_arch_list_matching mips64]
847 run_dump_test_arches "mips64-cp2" [mips_arch_list_matching mips64 \
850 run_dump_test_arches "mips64r2" [mips_arch_list_matching mips64r2]
851 run_list_test_arches "mips64r2-ill" [mips_arch_list_matching mips64r2]
853 run_dump_test "set-arch"
856 run_dump_test "mips64-mips3d"
857 run_dump_test_arches "mips64-mips3d-incl" [mips_arch_list_matching mips3d]
859 run_dump_test "mips64-mdmx"
860 run_dump_test "sb1-ext-mdmx"
861 run_dump_test "sb1-ext-ps"
862 run_dump_test "xlr-ext"
865 run_dump_test_arches "relax" [mips_arch_list_matching mips2 !mips32r6]
866 run_dump_test_arches "relax-at" [mips_arch_list_matching mips2 !mips32r6]
867 run_dump_test "relax-swap1-mips1"
868 run_dump_test "relax-swap1-mips2"
869 run_dump_test "relax-swap2"
870 run_dump_test_arches "relax-swap3" [mips_arch_list_all]
871 run_list_test_arches "relax-bc1any" "-mips3d -mabi=o64 -relax-branch" \
872 [mips_arch_list_matching mips64 \
873 !micromips !mips32r6]
874 run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \
875 [mips_arch_list_matching mips64r2 \
876 !micromips !mips32r6]
878 run_dump_test_arches "eva" [mips_arch_list_matching mips32r2 !octeon]
880 run_list_test "illegal" "-32"
881 run_list_test "baddata1" "-32"
882 run_list_test "jalr" ""
884 run_dump_test "mips-gp32-fp32"
885 run_dump_test "mips-gp32-fp64"
886 run_dump_test "mips-gp64-fp32"
887 run_dump_test "mips-gp64-fp64"
889 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
890 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
891 # and verify that they're the same. Specifically, we're checking
892 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
893 # instruction does get used. In previous versions of GAS,
894 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
895 run_dump_test "elf_e_flags1"
896 run_dump_test "elf_e_flags2"
897 run_dump_test "elf_e_flags3"
898 run_dump_test "elf_e_flags4"
900 # Check EF_MIPS_ARCH markings for each supported architecture.
901 run_dump_test "elf_arch_mips1"
902 run_dump_test "elf_arch_mips2"
903 run_dump_test "elf_arch_mips3"
904 run_dump_test "elf_arch_mips4"
905 run_dump_test "elf_arch_mips5"
906 run_dump_test "elf_arch_mips32"
907 run_dump_test "elf_arch_mips32r2"
908 run_dump_test "elf_arch_mips32r3"
909 run_dump_test "elf_arch_mips32r5"
910 run_dump_test "elf_arch_mips32r6"
911 run_dump_test "elf_arch_mips64"
912 run_dump_test "elf_arch_mips64r2"
913 run_dump_test "elf_arch_mips64r3"
914 run_dump_test "elf_arch_mips64r5"
915 run_dump_test "elf_arch_mips64r6"
917 # Verify that ASE markings are handled properly.
918 run_dump_test "elf_ase_mips16"
919 run_dump_test "elf_ase_mips16-2"
921 run_dump_test "elf_ase_micromips"
922 run_dump_test "elf_ase_micromips-2"
924 run_dump_test "mips-gp32-fp32-pic"
925 run_dump_test "mips-gp32-fp64-pic"
926 run_dump_test "mips-gp64-fp32-pic"
927 run_dump_test "mips-gp64-fp64-pic"
929 run_dump_test "mips-abi32"
930 run_dump_test "mips-abi32-pic"
931 run_dump_test "mips-abi32-pic2"
933 run_dump_test "elf${el}-rel"
934 run_dump_test_arches "elf${el}-rel2" [mips_arch_list_matching gpr64 !singlefloat]
935 run_dump_test "e32${el}-rel2"
936 run_dump_test "elf${el}-rel3"
937 run_dump_test_arches "elf-rel4" [mips_arch_list_matching gpr64]
938 run_dump_test "e32-rel4"
939 run_dump_test "elf-rel5"
940 run_dump_test "elf-rel6"
942 run_dump_test "elf-rel6-n32"
943 run_dump_test "elf-rel6-n64"
945 run_dump_test "elf-rel7"
946 run_dump_test "elf-rel8"
947 run_dump_test "elf-rel8-mips16"
948 run_dump_test "elf-rel9"
949 run_dump_test "elf-rel9-mips16"
951 run_dump_test "elf-rel10"
952 run_dump_test "elf-rel11"
954 run_dump_test "elf-rel12"
955 run_dump_test "elf-rel13"
956 run_dump_test "elf-rel13-mips16"
957 run_dump_test "elf-rel14"
960 run_dump_test "elf-rel15"
961 run_dump_test "elf-rel16"
963 run_dump_test "elf-rel-got-n32"
964 run_dump_test "elf-rel-xgot-n32"
965 run_dump_test "elf-rel-got-n64"
966 run_dump_test "elf-rel-xgot-n64"
968 run_dump_test "elf-rel17"
970 run_dump_test "elf-rel18"
972 run_dump_test "elf-rel19"
973 run_dump_test "elf-rel20"
975 run_dump_test "elf-rel21"
976 run_dump_test "elf-rel22"
977 run_dump_test "elf-rel23"
978 run_dump_test "elf-rel23a"
979 run_dump_test "elf-rel23b"
980 run_dump_test "elf-rel24"
983 run_dump_test "elf-rel25"
984 run_dump_test "elf-rel25a"
985 run_dump_test "elf-rel26"
987 run_dump_test_arches "elf-rel27" [mips_arch_list_all]
990 run_dump_test "elf-rel28-n32"
991 run_dump_test "elf-rel28-n64"
992 run_dump_test_arches "elf-rel29" [mips_arch_list_matching mips3]
994 run_list_test_arches "elf-rel30" "-32" [mips_arch_list_all]
996 run_dump_test "${tmips}mips${el}16-e"
997 run_dump_test "${tmips}mips${el}16-f"
999 run_dump_test "elf-consthilo"
1000 run_dump_test "expr1"
1002 run_list_test "tls-ill" "-32"
1003 run_dump_test "tls-o32"
1004 run_dump_test "tls-relw"
1005 run_dump_test "jalr2"
1006 run_dump_test_arches "jalr3" [mips_arch_list_matching mips1 \
1009 run_dump_test_arches "jalr3-n32" \
1010 [mips_arch_list_matching mips3 \
1012 run_dump_test_arches "jalr3-n64" \
1013 [mips_arch_list_matching mips3 \
1017 run_dump_test_arches "aent" [mips_arch_list_matching mips1]
1019 run_dump_test_arches "branch-misc-4" [mips_arch_list_matching mips1]
1020 run_dump_test_arches "branch-misc-4-64" [mips_arch_list_matching mips3]
1022 run_dump_test_arches "loc-swap" [mips_arch_list_all]
1023 run_dump_test_arches "loc-swap-dis" [mips_arch_list_all]
1024 run_dump_test_arches "loc-swap-2" [mips_arch_list_all]
1025 run_dump_test_arches "loc-swap-3" [mips_arch_list_all]
1027 run_dump_test "nan-legacy-1"
1028 run_dump_test "nan-legacy-2"
1029 run_dump_test "nan-legacy-3"
1030 run_dump_test "nan-legacy-4"
1031 run_dump_test "nan-legacy-5"
1033 run_dump_test "nan-2008-1"
1034 run_dump_test "nan-2008-2"
1035 run_dump_test "nan-2008-3"
1036 run_dump_test "nan-2008-4"
1038 run_list_test "nan-error-1"
1039 run_list_test "nan-error-2" "-mnan=foo"
1042 run_dump_test "n32-consec"
1045 # tests of objdump's ability to disassemble the move mnemonic
1046 run_dump_test_arches "move" [mips_arch_list_matching mips64 !micromips]
1047 run_dump_test_arches "micromips32-move" [mips_arch_list_matching micromips]
1049 # tests of objdump's ability to disassemble using different
1051 run_dump_test "gpr-names-numeric"
1052 run_dump_test "gpr-names-32"
1053 run_dump_test "gpr-names-n32"
1054 run_dump_test "gpr-names-64"
1056 run_dump_test "fpr-names-numeric"
1057 run_dump_test "fpr-names-32"
1058 run_dump_test "fpr-names-n32"
1059 run_dump_test "fpr-names-64"
1061 run_dump_test "cp0-names-numeric"
1062 run_dump_test "cp0-names-r3000"
1063 run_dump_test "cp0-names-r4000" \
1064 { { {name} {(r4000)} } { {objdump} {-M cp0-names=r4000} } }
1065 run_dump_test "cp0-names-r4000" \
1066 { { {name} {(r4400)} } { {objdump} {-M cp0-names=r4400} } }
1067 run_dump_test "cp0-names-mips32"
1068 run_dump_test "cp0-names-mips32r2"
1069 run_dump_test "cp0-names-mips64"
1070 run_dump_test "cp0-names-mips64r2"
1071 run_dump_test "cp0-names-sb1"
1073 run_dump_test "cp0sel-names-numeric"
1074 run_dump_test "cp0sel-names-mips32"
1075 run_dump_test "cp0sel-names-mips32r2"
1076 run_dump_test "cp0sel-names-mips64"
1077 run_dump_test "cp0sel-names-mips64r2"
1078 run_dump_test "cp0sel-names-sb1"
1080 run_dump_test "cp1-names-numeric"
1081 run_dump_test "cp1-names-r3000"
1082 run_dump_test "cp1-names-r4000" \
1083 { { {name} {(r4000)} } { {objdump} {-M cp0-names=r4000} } }
1084 run_dump_test "cp1-names-r4000" \
1085 { { {name} {(r4400)} } { {objdump} {-M cp0-names=r4400} } }
1086 run_dump_test "cp1-names-mips32"
1087 run_dump_test "cp1-names-mips32r2"
1088 run_dump_test "cp1-names-mips64"
1089 run_dump_test "cp1-names-mips64r2"
1090 run_dump_test "cp1-names-sb1"
1092 run_dump_test "hwr-names-numeric"
1093 run_dump_test "hwr-names-mips32r2"
1094 run_dump_test "hwr-names-mips64r2"
1096 run_dump_test "ldstla-32"
1097 run_dump_test "ldstla-32-mips3"
1098 run_dump_test "ldstla-32-shared"
1099 run_dump_test "ldstla-32-mips3-shared"
1100 run_list_test "ldstla-32-1" "-mabi=32" \
1101 "MIPS ld-st-la bad constants (ABI o32)"
1102 run_list_test "ldstla-32-mips3-1" "-mabi=32" \
1103 "MIPS ld-st-la bad constants (ABI o32, mips3)"
1104 run_list_test "ldstla-32-1" "-KPIC -mabi=32" \
1105 "MIPS ld-st-la bad constants (ABI o32, shared)"
1106 run_list_test "ldstla-32-mips3-1" "-KPIC -mabi=32" \
1107 "MIPS ld-st-la bad constants (ABI o32, mips3, shared)"
1108 run_dump_test "ldstla-eabi64"
1110 run_dump_test "ldstla-n64"
1111 run_dump_test "ldstla-n64-shared"
1112 run_dump_test "ldstla-n64-sym32"
1115 run_dump_test "macro-warn-1"
1116 run_dump_test "macro-warn-2"
1117 run_dump_test "macro-warn-3"
1118 run_dump_test "macro-warn-4"
1120 run_dump_test "macro-warn-1-n32"
1121 run_dump_test "macro-warn-2-n32"
1124 run_dump_test "noat-1"
1125 run_list_test "noat-2" ""
1126 run_list_test "noat-3" ""
1127 run_list_test "noat-4" ""
1128 run_list_test "noat-5" ""
1129 run_list_test "noat-6" ""
1130 run_list_test "noat-7" ""
1132 run_dump_test "at-1"
1133 run_list_test "at-2" "-32 -mips1" "MIPS at-2"
1135 run_dump_test "loongson-2e"
1136 run_dump_test "loongson-2f"
1137 run_dump_test "loongson-2f-2"
1138 run_dump_test "loongson-2f-3"
1140 run_dump_test "loongson-3a"
1141 run_dump_test "loongson-3a-2"
1142 run_dump_test "loongson-3a-3"
1144 run_dump_test_arches "octeon" [mips_arch_list_matching octeon]
1145 run_dump_test_arches "octeon-saa-saad" [mips_arch_list_matching octeonp]
1146 run_list_test_arches "octeon-ill" [mips_arch_list_matching octeon]
1147 run_dump_test_arches "octeon-pref" [mips_arch_list_matching octeon]
1148 run_dump_test_arches "octeon2" [mips_arch_list_matching octeon2]
1149 run_dump_test_arches "octeon3" [mips_arch_list_matching octeon3]
1151 run_dump_test "smartmips"
1152 run_dump_test_arches "mips32-dsp" [mips_arch_list_matching mips32r2 \
1154 run_dump_test_arches "mips32-dspr2" [mips_arch_list_matching mips32r2 \
1156 run_dump_test_arches "mips32-dspr3" [mips_arch_list_matching mips32r6]
1157 run_dump_test "mips64-dsp"
1158 run_dump_test "mips32-mt"
1160 run_dump_test "mips16-dwarf2"
1162 run_dump_test "mips16-dwarf2-n32"
1164 run_dump_test "mips16-stabs"
1166 run_dump_test "mips16e-jrc"
1167 run_dump_test "mips16e-save"
1168 run_list_test "mips16e-save-err" "-march=mips32 -32"
1169 run_dump_test "mips16e-64"
1170 run_list_test "mips16e-64" "-march=mips32 -32"
1171 run_dump_test "mips16-intermix"
1173 run_dump_test "vxworks1"
1174 run_dump_test "vxworks1-xgot"
1175 run_dump_test "vxworks1-el"
1176 run_dump_test "vxworks1-xgot-el"
1178 run_dump_test "noreorder"
1179 run_dump_test "align"
1180 run_dump_test "align2"
1181 run_dump_test "align2-el"
1182 run_dump_test "align3"
1183 run_dump_test "odd-float"
1184 run_dump_test "insn-opts"
1186 run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \
1187 [mips_arch_list_matching mips2]
1188 run_list_test_arches "mips-macro-ill-nofp" "-32 -msoft-float" \
1189 [mips_arch_list_matching mips2]
1191 run_list_test_arches "mips-hard-float-flag" \
1192 "-32 -msoft-float -mhard-float" \
1193 [mips_arch_list_matching mips1 !singlefloat]
1194 run_list_test_arches "mips-double-float-flag" \
1195 "-32 -msingle-float -mdouble-float" \
1196 [mips_arch_list_matching mips1 !singlefloat]
1198 run_dump_test "mips16-vis-1"
1199 run_dump_test "call-nonpic-1"
1200 run_dump_test "mips32-sync"
1201 run_dump_test_arches "mips32r2-sync" \
1202 [mips_arch_list_matching mips32r2]
1203 run_dump_test_arches "alnv_ps-swap" [mips_arch_list_matching fpisa5 \
1205 run_dump_test_arches "cache" [lsort -dictionary -unique [concat \
1206 [mips_arch_list_matching mips3] \
1207 [mips_arch_list_matching mips32] ] ]
1208 run_dump_test_arches "daddi" [mips_arch_list_matching mips3 \
1210 run_dump_test_arches "pref" [lsort -dictionary -unique [concat \
1211 [mips_arch_list_matching mips4] \
1212 [mips_arch_list_matching mips32] ] ]
1214 if $has_newabi { run_dump_test "cfi-n64-1" }
1216 run_dump_test "pr12915"
1217 run_dump_test "reginfo-1a"
1218 run_dump_test "reginfo-1b"
1220 run_dump_test "micromips"
1221 run_dump_test "micromips-trap"
1222 run_dump_test "micromips-insn32"
1223 run_dump_test "micromips-noinsn32"
1224 run_list_test "micromips" "-mips32r2 -32 -mfp64 -minsn32" \
1225 "microMIPS for MIPS32r2 (instructions invalid in insn32 mode)"
1226 run_list_test "micromips-size-0" \
1227 "-32 -march=mips64 -mmicromips" "microMIPS instruction size 0"
1228 run_dump_test "micromips-size-1"
1229 run_dump_test "micromips-branch-relax"
1230 run_dump_test "micromips-branch-relax-pic"
1231 run_dump_test "micromips-branch-delay"
1232 run_dump_test "micromips-warn-branch-delay"
1233 run_dump_test "micromips-warn-branch-delay-1"
1234 run_dump_test "micromips-b16"
1235 run_list_test "micromips-ill"
1237 run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \
1239 run_dump_test_arches "hilo-diff-eb" [mips_arch_list_all]
1240 run_dump_test_arches "hilo-diff-el" [mips_arch_list_all]
1242 run_dump_test_arches "hilo-diff-eb-n32" [mips_arch_list_matching mips3]
1243 run_dump_test_arches "hilo-diff-el-n32" [mips_arch_list_matching mips3]
1244 run_dump_test_arches "hilo-diff-eb-n64" [mips_arch_list_matching mips3]
1245 run_dump_test_arches "hilo-diff-el-n64" [mips_arch_list_matching mips3]
1247 run_dump_test_arches "lui" [mips_arch_list_matching mips1]
1248 run_list_test_arches "lui-1" "-32" [mips_arch_list_matching mips1]
1249 run_list_test_arches "lui-2" "-32" [mips_arch_list_matching mips1]
1251 run_dump_test "r5900"
1252 run_dump_test "r5900-full"
1253 run_list_test "r5900-nollsc" "-mabi=o64 -march=r5900"
1254 run_dump_test "r5900-vu0"
1255 run_dump_test "r5900-full-vu0"
1256 run_dump_test "r5900-all-vu0"
1257 run_list_test "r5900-error-vu0" "-march=r5900"
1259 run_list_test_arches "ext-ill" [mips_arch_list_matching mips64r2]
1261 run_list_test "ase-errors-1" "-mabi=32 -march=mips1" "ASE errors (1)"
1262 run_list_test "ase-errors-2" "-mabi=o64 -march=mips3" "ASE errors (2)"
1263 run_list_test "ase-errors-3" "-mabi=32 -march=mips1" "ASE errors (3)"
1264 run_list_test "ase-errors-4" "-mabi=o64 -march=mips3" "ASE errors (4)"
1266 run_dump_test_arches "la-reloc" [mips_arch_list_matching mips1]
1267 run_list_test "dla-warn" "-mabi=32 -march=mips3" \
1268 "DLA with 32-bit addresses"
1269 if { $has_newabi } {
1270 run_dump_test_arches "dla-reloc" [mips_arch_list_matching mips3]
1271 run_list_test "la-warn" "-mabi=64 -march=mips3" \
1272 "LA with 64-bit addresses"
1275 # Start with MIPS II to avoid load delay nops.
1276 run_dump_test_arches "ld-reloc" [mips_arch_list_matching mips2]
1277 run_dump_test_arches "ulw-reloc" [mips_arch_list_matching mips2 !mips32r6]
1278 run_dump_test_arches "ulh-reloc" [mips_arch_list_matching mips2 !mips32r6]
1280 run_dump_test "l_d-reloc"
1281 run_list_test "bltzal"
1283 run_dump_test_arches "msa" [mips_arch_list_matching mips32r2]
1284 run_dump_test_arches "msa64" [mips_arch_list_matching mips64r2]
1285 run_dump_test_arches "msa-relax" [mips_arch_list_matching mips32r2 !mips32r6]
1286 run_dump_test_arches "msa-branch" [mips_arch_list_matching mips32r2]
1288 run_dump_test_arches "xpa" [mips_arch_list_matching mips32r2 !micromips]
1289 run_dump_test_arches "r5" "-32" [mips_arch_list_matching mips32r5 !micromips]
1291 run_dump_test "pcrel-1"
1292 run_dump_test "pcrel-2"
1293 run_list_test "pcrel-3" "" "Invalid cross-section PC-relative references"
1294 run_dump_test "pcrel-4-32"
1296 run_dump_test "pcrel-4-n32"
1297 run_dump_test "pcrel-4-64"
1300 run_dump_test_arches "attr-gnu-4-0" "-32" \
1301 [mips_arch_list_matching mips1]
1302 run_dump_test_arches "attr-gnu-4-0" "-64" \
1303 [mips_arch_list_matching mips3]
1304 run_dump_test_arches "attr-gnu-4-0" "-mfp32 -32" \
1305 [mips_arch_list_matching mips1 !mips32r6]
1306 run_dump_test_arches "attr-gnu-4-0" "-mfpxx -32" \
1307 [mips_arch_list_matching mips2 !r5900]
1308 run_dump_test_arches "attr-gnu-4-0" "-mfp64 -32" \
1309 [mips_arch_list_matching mips32r2]
1310 run_dump_test_arches "attr-gnu-4-0" "-mfp64 -mno-odd-spreg -32" \
1311 [mips_arch_list_matching mips32r2]
1312 run_dump_test_arches "attr-gnu-4-0" "-mfp64 -64" \
1313 [mips_arch_list_matching mips3]
1314 run_dump_test_arches "attr-gnu-4-0" "-msingle-float -32" \
1315 [mips_arch_list_matching mips1]
1316 run_dump_test_arches "attr-gnu-4-0" "-msingle-float -64" \
1317 [mips_arch_list_matching mips3]
1318 run_dump_test_arches "attr-gnu-4-0" "-msoft-float -32" \
1319 [mips_arch_list_matching mips1]
1320 run_dump_test_arches "attr-gnu-4-0" "-msoft-float -64" \
1321 [mips_arch_list_matching mips3]
1322 run_dump_test_arches "attr-none-double" "-32" \
1323 [mips_arch_list_matching mips1 !mips32r6]
1324 run_dump_test_arches "r6-attr-none-double" "-32" \
1325 [mips_arch_list_matching mips32r6]
1326 run_dump_test_arches "attr-none-double" "-64" \
1327 [mips_arch_list_matching mips3]
1328 run_dump_test_arches "attr-none-o32-fpxx" \
1329 [mips_arch_list_matching mips2 !r5900]
1330 run_dump_test_arches "attr-none-o32-fp64" \
1331 [mips_arch_list_matching mips32r2]
1332 run_dump_test_arches "attr-none-o32-fp64-nooddspreg" \
1333 [mips_arch_list_matching mips32r2]
1334 run_dump_test_arches "attr-none-single-float" "-32" \
1335 [mips_arch_list_matching mips1]
1336 run_dump_test_arches "attr-none-single-float" "-64" \
1337 [mips_arch_list_matching mips3]
1338 run_dump_test_arches "attr-none-soft-float" "-32 -msoft-float" \
1339 [mips_arch_list_matching mips1]
1340 run_dump_test_arches "attr-none-soft-float" "-64 -msoft-float" \
1341 [mips_arch_list_matching mips3]
1343 run_list_test_arches "attr-gnu-4-1-mfp64" \
1344 "-32 -mfp64 -mno-odd-spreg" \
1345 [mips_arch_list_matching mips32r2]
1346 run_list_test_arches "attr-gnu-4-1-mfp64" "-32 -mfp64" \
1347 [mips_arch_list_matching mips32r2]
1348 run_list_test_arches "attr-gnu-4-1-mfp32" "-64 -mfp32" \
1349 [mips_arch_list_matching mips3 !mips64r6]
1350 run_list_test_arches "attr-gnu-4-1-msingle-float" "-32 -msingle-float" \
1351 [mips_arch_list_matching mips1]
1352 run_list_test_arches "attr-gnu-4-1-msoft-float" "-32 -msoft-float" \
1353 [mips_arch_list_matching mips1]
1354 run_dump_test_arches "attr-gnu-4-1" "-32 -mfpxx" \
1355 [mips_arch_list_matching mips2 !r5900]
1356 run_dump_test_arches "attr-gnu-4-1" "-32 -mfp32" \
1357 [mips_arch_list_matching mips1 !mips32r6]
1358 run_dump_test_arches "attr-gnu-4-1" "-64 -mfp64" \
1359 [mips_arch_list_matching mips3]
1361 run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp32" \
1362 [mips_arch_list_matching mips1 !mips32r6]
1363 run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfpxx" \
1364 [mips_arch_list_matching mips2 !r5900]
1365 run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp64" \
1366 [mips_arch_list_matching mips32r2]
1367 run_list_test_arches "attr-gnu-4-2-mdouble-float" \
1368 "-32 -mfp64 -mno-odd-spreg" \
1369 [mips_arch_list_matching mips32r2]
1370 run_list_test_arches "attr-gnu-4-2-mdouble-float" "-64 -mfp64" \
1371 [mips_arch_list_matching mips3]
1372 run_list_test_arches "attr-gnu-4-2-msoft-float" "-32 -msoft-float" \
1373 [mips_arch_list_matching mips1]
1374 run_dump_test_arches "attr-gnu-4-2" "-32" \
1375 [mips_arch_list_matching mips1]
1376 run_dump_test_arches "attr-gnu-4-2" "-64" \
1377 [mips_arch_list_matching mips3]
1379 run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp32" \
1380 [mips_arch_list_matching mips1 !mips32r6]
1381 run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfpxx" \
1382 [mips_arch_list_matching mips2 !r5900]
1383 run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp64" \
1384 [mips_arch_list_matching mips32r2]
1385 run_list_test_arches "attr-gnu-4-3-mhard-float" \
1386 "-32 -mfp64 -mno-odd-spreg" \
1387 [mips_arch_list_matching mips32r2]
1388 run_list_test_arches "attr-gnu-4-3-mhard-float" "-64 -mfp64" \
1389 [mips_arch_list_matching mips3]
1390 run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -msingle-float" \
1391 [mips_arch_list_matching mips1]
1392 run_dump_test_arches "attr-gnu-4-3" "-32" \
1393 [mips_arch_list_matching mips1]
1394 run_dump_test_arches "attr-gnu-4-3" "-64" \
1395 [mips_arch_list_matching mips3]
1397 run_list_test_arches "attr-gnu-4-4" "-32 -mfp32" \
1398 [mips_arch_list_matching mips1 !mips32r6]
1399 run_list_test_arches "attr-gnu-4-4" "-32 -mfpxx" \
1400 [mips_arch_list_matching mips2 !r5900]
1401 run_list_test_arches "attr-gnu-4-4" "-32 -mfp64" \
1402 [mips_arch_list_matching mips32r2]
1403 run_list_test_arches "attr-gnu-4-4" "-32 -mfp64 -mno-odd-spreg" \
1404 [mips_arch_list_matching mips32r2]
1405 run_list_test_arches "attr-gnu-4-4" "-64 -mfp64" \
1406 [mips_arch_list_matching mips3]
1407 run_list_test_arches "attr-gnu-4-4" "-32 -msingle-float" \
1408 [mips_arch_list_matching mips1]
1409 run_list_test_arches "attr-gnu-4-4" "-32 -msoft-float" \
1410 [mips_arch_list_matching mips1]
1412 run_list_test_arches "attr-gnu-4-5" "-32 -mfp32" \
1413 [mips_arch_list_matching mips1 !mips32r6]
1414 run_list_test_arches "attr-gnu-4-5" "-32 -mfp64" \
1415 [mips_arch_list_matching mips32r2]
1416 run_list_test_arches "attr-gnu-4-5" "-32 -mfp64 -mno-odd-spreg" \
1417 [mips_arch_list_matching mips32r2]
1418 run_list_test_arches "attr-gnu-4-5-64" "-64 -mfp64" \
1419 [mips_arch_list_matching mips3]
1420 run_list_test_arches "attr-gnu-4-5-msingle-float" "-32 -msingle-float" \
1421 [mips_arch_list_matching mips1]
1422 run_list_test_arches "attr-gnu-4-5-msoft-float" "-32 -msoft-float" \
1423 [mips_arch_list_matching mips1]
1424 run_dump_test_arches "attr-gnu-4-5" \
1425 [mips_arch_list_matching mips2 !r5900]
1427 run_list_test_arches "attr-gnu-4-6" "-32 -mfp32" \
1428 [mips_arch_list_matching mips1 !mips32r6]
1429 run_list_test_arches "attr-gnu-4-6-noodd" "-32 -mfp64 -mno-odd-spreg" \
1430 [mips_arch_list_matching mips32r2]
1431 run_list_test_arches "attr-gnu-4-6-64" "-64 -mfp64" \
1432 [mips_arch_list_matching mips3]
1433 run_list_test_arches "attr-gnu-4-6-msingle-float" "-32 -msingle-float" \
1434 [mips_arch_list_matching mips1]
1435 run_list_test_arches "attr-gnu-4-6-msoft-float" "-32 -msoft-float" \
1436 [mips_arch_list_matching mips1]
1437 run_list_test_arches "attr-gnu-4-6" "-32 -mfpxx" \
1438 [mips_arch_list_matching mips2 !r5900]
1439 run_dump_test_arches "attr-gnu-4-6" "-32 -mfp64" \
1440 [mips_arch_list_matching mips32r2]
1442 run_list_test_arches "attr-gnu-4-7" "-32 -mfp32" \
1443 [mips_arch_list_matching mips1 !mips32r6]
1444 run_list_test_arches "attr-gnu-4-7-odd" "-32 -mfp64" \
1445 [mips_arch_list_matching mips32r2]
1446 run_list_test_arches "attr-gnu-4-7-64" "-64 -mfp64" \
1447 [mips_arch_list_matching mips3]
1448 run_list_test_arches "attr-gnu-4-7-msingle-float" "-32 -msingle-float" \
1449 [mips_arch_list_matching mips1]
1450 run_list_test_arches "attr-gnu-4-7-msoft-float" "-32 -msoft-float" \
1451 [mips_arch_list_matching mips1]
1452 run_list_test_arches "attr-gnu-4-7" "-32 -mfpxx" \
1453 [mips_arch_list_matching mips2 !r5900]
1454 run_dump_test_arches "attr-gnu-4-7" "-32 -mfp64 -mno-odd-spreg" \
1455 [mips_arch_list_matching mips32r2]
1457 run_dump_test "attr-gnu-abi-fp-1"
1458 run_dump_test "attr-gnu-abi-msa-1"
1460 run_dump_test "module-override"
1461 run_dump_test "module-defer-warn1"
1462 run_list_test "module-defer-warn2" "-32"
1464 foreach testopt [list -mfp32 -mfpxx -mfp64 "-mfp64-noodd" \
1465 -msingle-float -msoft-float] {
1466 foreach cmdopt [list -mfp32 -mfpxx -mfp64 "-mfp64 -mno-odd-spreg" \
1467 -msingle-float -msoft-float] {
1468 run_dump_test "module${testopt}" \
1469 [list [list as $cmdopt] [list name ($cmdopt)]]
1473 run_dump_test "module-set-mfpxx"
1474 run_list_test_arches "fpxx-oddfpreg" "-32 -mfpxx" \
1475 [mips_arch_list_matching mips2 !singlefloat]
1476 run_list_test_arches "fpxx-oddfpreg" "-32 -mfpxx -mno-odd-spreg" \
1477 [mips_arch_list_matching mips2 !singlefloat]
1478 run_dump_test_arches "fpxx-oddfpreg" \
1479 [mips_arch_list_matching oddspreg]
1480 run_dump_test_arches "odd-spreg" "-mfp32" [mips_arch_list_matching oddspreg]
1481 run_dump_test_arches "odd-spreg" "-mfpxx" [mips_arch_list_matching oddspreg]
1482 run_dump_test_arches "odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
1483 run_dump_test_arches "no-odd-spreg" "-mfp32" [mips_arch_list_matching mips1 \
1485 run_dump_test_arches "no-odd-spreg" "-mfpxx" [mips_arch_list_matching mips2 !r5900]
1486 run_dump_test_arches "no-odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
1487 run_dump_test "module-check"
1488 run_list_test "module-check-warn" "-32"
1490 run_dump_test "li-d"
1492 run_dump_test "option-pic-1"
1493 run_list_test "option-pic-2" "" \
1494 "MIPS invalid PIC option"
1495 run_list_test "option-pic-vxworks-1" "-mvxworks-pic" \
1496 "MIPS invalid PIC option in VxWorks PIC"
1497 run_list_test "option-pic-vxworks-2" "-mvxworks-pic" \
1498 "MIPS invalid switch to SVR4 PIC from VxWorks PIC"
1500 run_dump_test_arches "isa-override-1" "" [mips_arch_list_matching mips1]
1501 run_list_test_arches "isa-override-2" "-32" [mips_arch_list_matching mips1]
1503 run_dump_test_arches "r6" [mips_arch_list_matching mips32r6]
1505 run_dump_test_arches "r6-n32" [mips_arch_list_matching mips64r6]
1506 run_dump_test_arches "r6-n64" [mips_arch_list_matching mips64r6]
1507 run_dump_test_arches "r6-64-n32" [mips_arch_list_matching mips64r6]
1508 run_dump_test_arches "r6-64-n64" [mips_arch_list_matching mips64r6]
1509 run_list_test_arches "ldpc-unalign" "-64" [mips_arch_list_matching mips64r6]
1511 run_list_test_arches "r6-removed" "-32" [mips_arch_list_matching mips32r6]
1512 run_list_test_arches "r6-64-removed" [mips_arch_list_matching mips64r6]
1514 run_list_test_arches "r6-branch-constraints" "-32" \
1515 [mips_arch_list_matching mips32r6]