2 # Some generic MIPS tests
5 # When adding a new test to this file, try to do the following things:
7 # * If testing assembly and disassembly of code, don't forget to test
8 # the actual bit encodings of the instructions (using the
9 # --show-raw-insn flag to objdump).
11 # * Try to run the test for as many architectures as appropriate,
12 # using the "run_dump_test_arches" or "run_list_test_arches" functions,
13 # along with the output from a call to "mips_arch_list_matching."
15 # * Be sure to compare the test output before and after your testsuite
16 # changes, to verify that existing and new tests were run as expected.
17 # Look for expect ERROR messages in the testsuite .log file to make sure
18 # the new expect code did not contain errors.
20 # To add support for a new CPU to this file, add an appropriate entry
21 # to the sequence of "mips_arch_create" function calls below, and test
22 # the result. The new CPU should automatically be used when running
23 # various tests. If the new CPU is the default CPU for any tool
24 # targets, make sure the call to "mips_arch_create" reflects that fact.
27 # "LOSE" marks information about tests which fail at a particular point
28 # in time, but which are not XFAILed. Either they used to pass
29 # and indicate either regressions or the need to tweak the tests to keep
30 # up the with code, or they are new tests and it is unknown whether or not
31 # they should pass as-is for the given object formats.
34 # The functions below create and manipulate an "architecture data
35 # array" which contains entries for each MIPS architecture (or CPU)
36 # known to these tests. The array contains the following information
37 # for each architecture, indexed by the name of the architecture
38 # described by the entry:
40 # displayname: The name of the entry to be used for pretty-printing.
42 # gprsize: The size in bits of General Purpose Registers provided by
43 # the architecture (must be 32 or 64).
45 # props: A list of text strings which are associated with the
46 # architecture. These include the architecture name as well as
47 # information about what instructions the CPU supports. When matching
48 # based on properties, an additional property is added to the normal
49 # property list, "gpr<gprsize>" so that tests can match CPUs which
50 # have GPRs of a specific size. The following properties are most
51 # useful when matching properties for generic (i.e., not CPU-specific)
54 # mips1, mips2, mips3, mips4, mips5, mips32, mips64
55 # The architecture includes the instructions defined
59 # The architecture interlocks GPRs accesses. (That is,
60 # there are no load delay slots.)
62 # mips3d The architecture includes the MIPS-3D ASE.
64 # ror The architecture includes hardware rotate instructions.
67 # The architecture provides 32- or 64-bit General Purpose
70 # as_flags: The assembler flags used when assembling tests for this
73 # objdump_flags: The objdump flags used when disassembling tests for
76 # Most entries in the architecture array will have values in all of
77 # the fields above. One entry, "default" represents the default CPU
78 # based on the target of the assembler being built. If always has
79 # empty "as_flags" and "objdump_flags."
83 # This function initializes the architecture data array ("mips_arches")
85 proc mips_arch_init {} {
88 # Catch because the variable won't be set the first time through.
89 catch {unset mips_arches}
92 # mips_arch_create ARCH GPRSIZE EXTENDS PROPS AS_FLAGS OBJDUMP_FLAGS \
93 # (optional:) DEFAULT_FOR_TARGETS
95 # This function creates a new entry in the architecture data array,
96 # for the architecture or CPU named ARCH, and fills in the entry
97 # according to the rest of the arguments.
99 # The new entry's property list is initialized to contain ARCH, any
100 # properties specified by PROPS, and the properties associated with
101 # the entry specified by EXTENDS. (The new architecture is considered
102 # to extend the capabilities provided by that architecture.)
104 # If DEFAULT_FOR_TARGETS is specified, it is a list of targets for which
105 # this architecture is the default architecture. If "istarget" returns
106 # true for any of the targets in the list, a "default" entry will be
107 # added to the architecture array which indicates that ARCH is the default
109 proc mips_arch_create {arch gprsize extends props as_flags objdump_flags
110 {default_for_targets {}}} {
113 if { [info exists mips_arches($arch)] } {
114 error "mips_arch_create: arch \"$arch\" already exists"
116 if { $gprsize != 32 && $gprsize != 64 } {
117 error "mips_arch_create: invalid GPR size $gprsize"
120 set archdata(displayname) $arch
121 set archdata(gprsize) $gprsize
122 set archdata(as_flags) $as_flags
123 set archdata(objdump_flags) $objdump_flags
124 set archdata(props) $arch
125 eval lappend archdata(props) $props
126 if { [string length $extends] != 0 } {
127 eval lappend archdata(props) [mips_arch_properties $extends 0]
130 set mips_arches($arch) [array get archdata]
132 # Set as default if appropriate.
133 foreach target $default_for_targets {
134 if { [istarget $target] } {
135 if { [info exists mips_arches(default)] } {
136 error "mips_arch_create: default arch already exists"
139 set archdata(displayname) "default = $arch"
140 set archdata(as_flags) ""
141 set archdata(objdump_flags) ""
143 set mips_arches(default) [array get archdata]
151 # This function returns the list of all names of entries in the
152 # architecture data array (including the default entry, if a default
154 proc mips_arch_list_all {} {
156 return [lsort -dictionary [array names mips_arches]]
159 # mips_arch_data ARCH
161 # This function returns the information associated with ARCH
162 # in the architecture data array, in "array get" form.
163 proc mips_arch_data {arch} {
166 if { ! [info exists mips_arches($arch)] } {
167 error "mips_arch_data: unknown arch \"$arch\""
169 return $mips_arches($arch)
172 # mips_arch_displayname ARCH
174 # This function returns the printable name associated with ARCH in
175 # the architecture data array.
176 proc mips_arch_displayname {arch} {
177 array set archdata [mips_arch_data $arch]
178 return $archdata(displayname)
181 # mips_arch_properties ARCH (optional:) INCLUDE_GPRSIZE
183 # This function returns the property list associated with ARCH in the
184 # architecture data array. If INCLUDE_GPRSIZE is non-zero, an additional
185 # "gpr32" or "gpr64" property will be returned as part of the list based
186 # on the architecture's GPR size.
187 proc mips_arch_properties {arch {include_gprsize 1}} {
188 array set archdata [mips_arch_data $arch]
189 set props $archdata(props)
190 if { $include_gprsize } {
191 lappend props gpr$archdata(gprsize)
196 # mips_arch_as_flags ARCH
198 # This function returns the assembler flags associated with ARCH in
199 # the architecture data array.
200 proc mips_arch_as_flags {arch} {
201 array set archdata [mips_arch_data $arch]
202 return $archdata(as_flags)
205 # mips_arch_objdump_flags ARCH
207 # This function returns the objdump disassembly flags associated with
208 # ARCH in the architecture data array.
209 proc mips_arch_objdump_flags {arch} {
210 array set archdata [mips_arch_data $arch]
211 return $archdata(objdump_flags)
214 # mips_arch_matches ARCH PROPMATCHLIST
216 # This function returns non-zero if ARCH matches the set of properties
217 # described by PROPMATCHLIST. Each entry in PROPMATCHLIST can either
218 # be the name of a property which must be matched, or "!" followed by
219 # the name of a property which must not be matched. ARCH matches
220 # PROPMATCHLIST if and only if all of the conditions specified by
221 # PROPMATCHLIST are satisfied.
222 proc mips_arch_matches {arch propmatchlist} {
223 foreach pm $propmatchlist {
224 if { [string match {!*} $pm] } {
227 set p [string range $pm 1 end]
229 # fail if not present.
234 set loc [lsearch -exact [mips_arch_properties $arch] $p]
236 # required-absent and found, or required-present and not found: fail.
237 if { ($inverted && $loc != -1) || (! $inverted && $loc == -1) } {
244 # mips_arch_list_matching ARGS
246 # This function returns a list of all architectures which match
247 # the conditions described by its arguments. Its arguments are
248 # taken as a list and used as the PROPMATCHLIST in a call to
249 # "mips_arch_matches" for each known architecture.
250 proc mips_arch_list_matching {args} {
252 foreach arch [mips_arch_list_all] {
253 # For now, don't match default arch until we know what its
254 # properties actually are.
255 if { [string compare $arch default] == 0
256 && [string length [mips_arch_properties default]] == 0} {
259 if { [mips_arch_matches $arch $args] } {
267 # The functions below facilitate running various types of tests.
269 # run_dump_test_arch NAME ARCH
271 # Invoke "run_dump_test" for test NAME, with extra assembler and
272 # disassembler flags to test architecture ARCH.
273 proc run_dump_test_arch { name arch } {
276 if [catch {run_dump_test $name \
277 "{name {([mips_arch_displayname $arch])}}
278 {objdump {[mips_arch_objdump_flags $arch]}}
279 {as {[mips_arch_as_flags $arch]}}"} rv] {
281 untested "$subdir/$name ($arch)"
285 # run_dump_test_arches NAME ARCH_LIST
287 # Invoke "run_dump_test_arch" for test NAME, for each architecture
288 # listed in ARCH_LIST.
289 proc run_dump_test_arches { name arch_list } {
290 foreach arch $arch_list {
291 run_dump_test_arch "$name" "$arch"
295 # run_list_test_arch NAME OPTS ARCH
297 # Invoke "run_list_test" for test NAME with options OPTS, with extra
298 # assembler flags to test architecture ARCH.
299 proc run_list_test_arch { name opts arch } {
302 set testname "MIPS $name ([mips_arch_displayname $arch])"
303 if [catch {run_list_test "$name" "$opts [mips_arch_as_flags $arch]" \
310 # run_list_test_arches NAME OPTS ARCH_LIST
312 # Invoke "run_list_test_arch" for test NAME with options OPTS, for each
313 # architecture listed in ARCH_LIST.
314 proc run_list_test_arches { name opts arch_list } {
315 foreach arch $arch_list {
316 run_list_test_arch "$name" "$opts" "$arch"
321 # Create the architecture data array by providing data for all
322 # known architectures.
324 # Note that several targets pick default CPU based on ABI. We
325 # can't easily handle that; do NOT list those targets as defaulting
326 # to any architecture.
328 mips_arch_create mips1 32 {} {} \
329 { -march=mips1 -mtune=mips1 } { -mmips:3000 }
330 mips_arch_create mips2 32 mips1 { gpr_ilocks } \
331 { -march=mips2 -mtune=mips2 } { -mmips:6000 }
332 mips_arch_create mips3 64 mips2 {} \
333 { -march=mips3 -mtune=mips3 } { -mmips:4000 }
334 mips_arch_create mips4 64 mips3 {} \
335 { -march=mips4 -mtune=mips4 } { -mmips:8000 }
336 mips_arch_create mips5 64 mips4 {} \
337 { -march=mips5 -mtune=mips5 } { -mmips:mips5 }
338 mips_arch_create mips32 32 mips2 {} \
339 { -march=mips32 -mtune=mips32 } { -mmips:isa32 } \
340 { mipsisa32-*-* mipsisa32el-*-* }
341 mips_arch_create mips32r2 32 mips32 { ror } \
342 { -march=mips32r2 -mtune=mips32r2 } \
344 { mipsisa32r2-*-* mipsisa32r2el-*-* }
345 mips_arch_create mips64 64 mips5 { mips32 } \
346 { -march=mips64 -mtune=mips64 } { -mmips:isa64 } \
347 { mipsisa64-*-* mipsisa64el-*-* }
348 mips_arch_create mips64r2 64 mips64 { mips32r2 ror } \
349 { -march=mips64r2 -mtune=mips64r2 } \
351 { mipsisa64r2-*-* mipsisa64r2el-*-* }
352 mips_arch_create r3000 32 mips1 {} \
353 { -march=r3000 -mtune=r3000 } { -mmips:3000 }
354 mips_arch_create r3900 32 mips1 { gpr_ilocks } \
355 { -march=r3900 -mtune=r3900 } { -mmips:3900 } \
356 { mipstx39-*-* mipstx39el-*-* }
357 mips_arch_create r4000 64 mips3 {} \
358 { -march=r4000 -mtune=r4000 } { -mmips:4000 }
359 mips_arch_create vr5400 64 mips4 { ror } \
360 { -march=vr5400 -mtune=vr5400 } { -mmips:5400 }
361 mips_arch_create sb1 64 mips64 { mips3d } \
362 { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
363 { mipsisa64sb1-*-* mipsisa64sb1el-*-* }
364 mips_arch_create octeon 64 mips64r2 {} \
365 { -march=octeon -mtune=octeon } { -mmips:octeon } \
366 { mips64octeon*-*-* }
367 mips_arch_create xlr 64 mips64 {} \
368 { -march=xlr -mtune=xlr } { -mmips:xlr }
371 # And now begin the actual tests! VxWorks uses RELA rather than REL
372 # relocations, so most of the generic dump tests will not work there.
374 if { [istarget mips*-*-vxworks*] } {
375 run_dump_test "vxworks1"
376 run_dump_test "vxworks1-xgot"
377 run_dump_test "vxworks1-el"
378 run_dump_test "vxworks1-xgot-el"
379 } elseif { [istarget mips*-*-*] } {
381 set elf [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] || [istarget *-*-netbsd*] ]
382 set ecoff [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
383 set aout [expr [istarget *-*-bsd*] || [istarget *-*-openbsd*] ]
384 set gpr_ilocks [expr [istarget mipstx39*-*-*]]
385 set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] || [istarget mips*-*-ecoff]]
386 set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
388 if { [istarget "mips*-*-*linux*"] || [istarget "mips*-sde-elf*"] } then {
393 if [istarget mips*el-*-*] {
402 run_dump_test_arches "abs" [mips_arch_list_matching mips1]
403 run_dump_test_arches "add" [mips_arch_list_matching mips1]
404 run_dump_test_arches "and" [mips_arch_list_matching mips1]
405 run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1]
406 run_list_test_arches "mips1-fp" "-32 -msoft-float" \
407 [mips_arch_list_matching mips1]
408 run_dump_test "break20"
409 run_dump_test "trap20"
411 # LOSE: As of 2002-02-08, "beq" through "bltu" fail for target mips-ecoff.
412 # See http://sources.redhat.com/ml/binutils/2001-10/msg00418.html for
413 # more information. Not sure if the fixes there are correct; should
414 # branches to external labels be allowed for ECOFF?
415 run_dump_test_arches "beq" [mips_arch_list_matching mips1]
416 run_dump_test_arches "bge" [mips_arch_list_matching mips1]
417 run_dump_test_arches "bgeu" [mips_arch_list_matching mips1]
418 run_dump_test_arches "blt" [mips_arch_list_matching mips1]
419 run_dump_test_arches "bltu" [mips_arch_list_matching mips1]
420 run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2]
421 run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
422 run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1]
423 run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1]
424 run_dump_test_arches "branch-misc-2-64" [mips_arch_list_matching mips3]
425 run_dump_test_arches "branch-misc-2pic-64" [mips_arch_list_matching mips3]
426 run_dump_test "branch-misc-3"
427 run_dump_test "branch-swap"
431 run_dump_test_arches "dli" [mips_arch_list_matching mips3]
434 run_dump_test_arches "elf-jal" [mips_arch_list_matching mips1]
438 run_dump_test "eret-1"
439 run_dump_test "eret-2"
440 run_dump_test "eret-3"
442 if $elf { run_dump_test "jal-svr4pic" }
443 if $elf { run_dump_test "jal-xgot" }
444 run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]
445 if $has_newabi { run_dump_test "jal-newabi" }
446 if !$aout { run_dump_test "la" }
447 if $elf { run_dump_test "la-svr4pic" }
448 if $elf { run_dump_test "la-xgot" }
449 if $elf { run_dump_test "lca-svr4pic" }
450 if $elf { run_dump_test "lca-xgot" }
452 # XXX FIXME: Has mips2 and later insns with mips1 disassemblies.
453 # (Should split and then use appropriate arch lists.)
454 run_dump_test_arches "lb" [mips_arch_list_matching !mips2]
457 run_dump_test_arches "lb-svr4pic" [mips_arch_list_matching !gpr_ilocks]
458 run_dump_test_arches "lb-svr4pic-ilocks" [mips_arch_list_matching gpr_ilocks]
461 # Both versions specify the cpu, so we can run both regardless of
462 # the interlocking in the configured default cpu.
463 run_dump_test "lb-xgot"
464 run_dump_test "lb-xgot-ilocks"
471 run_dump_test "ld-ilocks"
473 run_dump_test "ld-ilocks-addr32"
477 if $elf { run_dump_test "ld-svr4pic" }
478 if $elf { run_dump_test "ld-xgot" }
479 run_dump_test_arches "li" [mips_arch_list_matching mips1]
480 if !$aout { run_dump_test "lifloat" }
481 if $elf { run_dump_test "lif-svr4pic" }
482 if $elf { run_dump_test "lif-xgot" }
483 run_dump_test_arches "mips4" [mips_arch_list_matching mips4]
484 run_dump_test_arches "mips4-fp" [mips_arch_list_matching mips4]
485 run_list_test_arches "mips4-fp" "-32 -msoft-float" \
486 [mips_arch_list_matching mips4]
487 run_dump_test_arches "mips5" [mips_arch_list_matching mips5]
490 run_dump_test_arches "rol" [mips_arch_list_matching !ror]
491 run_dump_test_arches "rol-hw" [mips_arch_list_matching ror]
493 run_dump_test_arches "rol64" [mips_arch_list_matching gpr64 !ror]
494 run_dump_test_arches "rol64-hw" [mips_arch_list_matching gpr64 ror]
496 if !$aout { run_dump_test "sb" }
497 run_dump_test "trunc"
498 if !$aout { run_dump_test "ulh" }
499 run_dump_test_arches "ulh2-eb" [mips_arch_list_matching mips1]
500 run_dump_test_arches "ulh2-el" [mips_arch_list_matching mips1]
501 if $elf { run_dump_test "ulh-svr4pic" }
502 if $elf { run_dump_test "ulh-xgot" }
510 run_dump_test_arches "ulw2-eb" [mips_arch_list_matching !gpr_ilocks]
511 run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks]
512 run_dump_test_arches "ulw2-el" [mips_arch_list_matching !gpr_ilocks]
513 run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks]
515 run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3]
516 run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3]
518 # The mips16 test can only be run on ELF, because only ELF
519 # supports the necessary mips16 reloc.
520 if { $elf && !$no_mips16 } {
521 run_dump_test "mips16"
522 run_dump_test "mips16-64"
523 # Check MIPS16e extensions
524 run_dump_test_arches "mips16e" [mips_arch_list_matching mips32]
525 # Check jalx handling
526 run_dump_test "mips16-jalx"
527 run_dump_test "mips-jalx"
528 run_dump_test "mips-jalx-2"
529 # Check MIPS16 HI16/LO16 relocations
530 run_dump_test "mips16-hilo"
532 run_dump_test "mips16-hilo-n32"
534 run_dump_test "mips16-hilo-match"
536 run_dump_test "delay"
537 run_dump_test "nodelay"
538 run_dump_test "mips4010"
539 run_dump_test "mips4650"
540 run_dump_test "mips4100"
541 run_dump_test "vr4111"
542 run_dump_test "vr4120"
543 run_dump_test "vr4120-2"
544 run_dump_test "vr4130"
545 run_dump_test "vr5400"
546 run_dump_test "vr5500"
547 run_dump_test "rm7000"
548 run_dump_test "perfcount"
549 run_dump_test "lineno"
552 run_dump_test_arches "mips32" [mips_arch_list_matching mips32]
554 run_dump_test_arches "mips32-sf32" [mips_arch_list_matching mips32]
555 run_list_test_arches "mips32-sf32" "-32 -msoft-float" \
556 [mips_arch_list_matching mips32]
557 run_dump_test_arches "mips32-cp2" [mips_arch_list_matching mips32 \
560 run_dump_test_arches "mips32r2" [mips_arch_list_matching mips32r2]
561 run_dump_test_arches "mips32r2-cp2" [mips_arch_list_matching mips32r2 \
563 run_dump_test_arches "mips32r2-fp32" \
564 [mips_arch_list_matching mips32r2]
565 run_list_test_arches "mips32r2-fp32" "-32 -msoft-float" \
566 [mips_arch_list_matching mips32r2]
567 run_list_test_arches "mips32r2-ill" "-32" \
568 [mips_arch_list_matching mips32r2 gpr32]
569 run_list_test_arches "mips32r2-ill-fp64" "-mabi=o64" \
570 [mips_arch_list_matching mips32r2 gpr64]
571 run_list_test_arches "mips32r2-ill-nofp" "-32 -msoft-float" \
572 [mips_arch_list_matching mips32r2]
574 run_dump_test_arches "mips64" [mips_arch_list_matching mips64]
575 run_dump_test_arches "mips64-cp2" [mips_arch_list_matching mips64 \
578 run_dump_test_arches "mips64r2" [mips_arch_list_matching mips64r2]
579 run_list_test_arches "mips64r2-ill" "" [mips_arch_list_matching mips64r2]
581 run_dump_test "set-arch"
584 run_dump_test "mips64-mips3d"
585 run_dump_test_arches "mips64-mips3d-incl" [mips_arch_list_matching mips3d]
587 run_dump_test "mips64-mdmx"
588 run_dump_test "sb1-ext-mdmx"
589 run_dump_test "sb1-ext-ps"
590 run_dump_test "xlr-ext"
593 run_dump_test "relax"
594 run_dump_test "relax-swap1-mips1"
595 run_dump_test "relax-swap1-mips2"
596 run_dump_test "relax-swap2"
598 run_list_test "illegal" "-32"
599 run_list_test "baddata1" "-32"
600 run_list_test "jalr" ""
602 # LOSE: As of 2002-02-08, the next 4 tests fail for target mips-ecoff.
603 # It's unknown whether they _should_ pass as-is, or whether different
604 # variants are needed for ELF and ECOFF.
605 run_dump_test "mips-gp32-fp32"
606 run_dump_test "mips-gp32-fp64"
607 run_dump_test "mips-gp64-fp32"
608 run_dump_test "mips-gp64-fp64"
611 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
612 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
613 # and verify that they're the same. Specifically, we're checking
614 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
615 # instruction does get used. In previous versions of GAS,
616 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
617 run_dump_test "elf_e_flags1"
618 run_dump_test "elf_e_flags2"
619 run_dump_test "elf_e_flags3"
620 run_dump_test "elf_e_flags4"
622 # Check EF_MIPS_ARCH markings for each supported architecture.
623 run_dump_test "elf_arch_mips1"
624 run_dump_test "elf_arch_mips2"
625 run_dump_test "elf_arch_mips3"
626 run_dump_test "elf_arch_mips4"
627 run_dump_test "elf_arch_mips5"
628 run_dump_test "elf_arch_mips32"
629 run_dump_test "elf_arch_mips32r2"
630 run_dump_test "elf_arch_mips64"
631 run_dump_test "elf_arch_mips64r2"
633 # Verify that ASE markings are handled properly.
634 if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
636 run_dump_test "mips-gp32-fp32-pic"
637 run_dump_test "mips-gp32-fp64-pic"
638 run_dump_test "mips-gp64-fp32-pic"
639 run_dump_test "mips-gp64-fp64-pic"
641 run_dump_test "mips-abi32"
642 run_dump_test "mips-abi32-pic"
643 run_dump_test "mips-abi32-pic2"
645 run_dump_test "elf${el}-rel"
646 run_dump_test_arches "elf${el}-rel2" [mips_arch_list_matching gpr64]
647 run_dump_test "e32${el}-rel2"
648 run_dump_test "elf${el}-rel3"
649 run_dump_test_arches "elf-rel4" [mips_arch_list_matching gpr64]
650 run_dump_test "e32-rel4"
651 run_dump_test "elf-rel5"
652 run_dump_test "elf-rel6"
654 run_dump_test "elf-rel6-n32"
655 run_dump_test "elf-rel6-n64"
657 run_dump_test "elf-rel7"
658 run_dump_test "elf-rel8"
659 run_dump_test "elf-rel8-mips16"
660 run_dump_test "elf-rel9"
661 run_dump_test "elf-rel9-mips16"
663 run_dump_test "elf-rel10"
664 run_dump_test "elf-rel11"
666 run_dump_test "elf-rel12"
667 run_dump_test "elf-rel13"
668 run_dump_test "elf-rel13-mips16"
669 run_dump_test "elf-rel14"
672 run_dump_test "elf-rel15"
673 run_dump_test "elf-rel16"
675 run_dump_test "elf-rel-got-n32"
676 run_dump_test "elf-rel-xgot-n32"
677 run_dump_test "elf-rel-got-n64"
678 run_dump_test "elf-rel-xgot-n64"
680 run_dump_test "elf-rel17"
682 run_dump_test "elf-rel18"
684 run_dump_test "elf-rel19"
685 run_dump_test "elf-rel20"
687 run_dump_test "elf-rel21"
688 run_dump_test "elf-rel22"
689 run_dump_test "elf-rel23"
690 run_dump_test "elf-rel23a"
691 run_dump_test "elf-rel23b"
692 run_dump_test "elf-rel24"
695 run_dump_test "elf-rel25"
696 run_dump_test "elf-rel25a"
697 run_dump_test "elf-rel26"
700 run_dump_test "${tmips}mips${el}16-e"
701 run_dump_test "${tmips}mips${el}16-f"
703 run_dump_test "elf-consthilo"
704 run_dump_test "expr1"
706 run_list_test "tls-ill" "-32"
707 run_dump_test "tls-o32"
708 run_dump_test "jalr2"
712 run_dump_test "n32-consec"
715 # tests of objdump's ability to disassemble using different
717 run_dump_test "gpr-names-numeric"
718 run_dump_test "gpr-names-32"
719 run_dump_test "gpr-names-n32"
720 run_dump_test "gpr-names-64"
722 run_dump_test "fpr-names-numeric"
723 run_dump_test "fpr-names-32"
724 run_dump_test "fpr-names-n32"
725 run_dump_test "fpr-names-64"
727 run_dump_test "cp0-names-numeric"
728 run_dump_test "cp0-names-r3000"
729 run_dump_test "cp0-names-r4000" \
730 { { {name} {(r4000)} } { {objdump} {-M cp0-names=r4000} } }
731 run_dump_test "cp0-names-r4000" \
732 { { {name} {(r4400)} } { {objdump} {-M cp0-names=r4400} } }
733 run_dump_test "cp0-names-mips32"
734 run_dump_test "cp0-names-mips32r2"
735 run_dump_test "cp0-names-mips64"
736 run_dump_test "cp0-names-mips64r2"
737 run_dump_test "cp0-names-sb1"
739 run_dump_test "cp0sel-names-numeric"
740 run_dump_test "cp0sel-names-mips32"
741 run_dump_test "cp0sel-names-mips32r2"
742 run_dump_test "cp0sel-names-mips64"
743 run_dump_test "cp0sel-names-mips64r2"
744 run_dump_test "cp0sel-names-sb1"
746 run_dump_test "hwr-names-numeric"
747 run_dump_test "hwr-names-mips32r2"
748 run_dump_test "hwr-names-mips64r2"
750 run_dump_test "ldstla-32"
751 run_dump_test "ldstla-32-mips3"
752 run_dump_test "ldstla-32-shared"
753 run_dump_test "ldstla-32-mips3-shared"
754 run_list_test "ldstla-32-1" "-mabi=32" \
755 "MIPS ld-st-la bad constants (ABI o32)"
756 run_list_test "ldstla-32-mips3-1" "-mabi=32" \
757 "MIPS ld-st-la bad constants (ABI o32, mips3)"
758 run_list_test "ldstla-32-1" "-KPIC -mabi=32" \
759 "MIPS ld-st-la bad constants (ABI o32, shared)"
760 run_list_test "ldstla-32-mips3-1" "-KPIC -mabi=32" \
761 "MIPS ld-st-la bad constants (ABI o32, mips3, shared)"
762 run_dump_test "ldstla-eabi64"
764 run_dump_test "ldstla-n64"
765 run_dump_test "ldstla-n64-shared"
766 run_dump_test "ldstla-n64-sym32"
769 run_dump_test "macro-warn-1"
770 run_dump_test "macro-warn-2"
771 run_dump_test "macro-warn-3"
772 run_dump_test "macro-warn-4"
774 run_dump_test "macro-warn-1-n32"
775 run_dump_test "macro-warn-2-n32"
778 run_dump_test "noat-1"
779 run_list_test "noat-2" ""
780 run_list_test "noat-3" ""
781 run_list_test "noat-4" ""
782 run_list_test "noat-5" ""
783 run_list_test "noat-6" ""
784 run_list_test "noat-7" ""
787 run_list_test "at-2" "-32 -mips1" "MIPS at-2"
789 run_dump_test "loongson-2e"
790 run_dump_test "loongson-2f"
791 run_dump_test "loongson-2f-2"
792 run_dump_test "loongson-2f-3"
794 run_dump_test_arches "octeon" [mips_arch_list_matching octeon]
795 run_list_test_arches "octeon-ill" "" \
796 [mips_arch_list_matching octeon]
798 run_dump_test "smartmips"
799 run_dump_test "mips32-dsp"
800 run_dump_test "mips32-dspr2"
801 run_dump_test "mips64-dsp"
802 run_dump_test "mips32-mt"
804 if { $elf && !$no_mips16 } {
805 run_dump_test "mips16-dwarf2"
807 run_dump_test "mips16-dwarf2-n32"
811 run_dump_test "mips16e-jrc"
812 run_dump_test "mips16e-save"
813 run_dump_test "mips16e-64"
814 run_list_test "mips16e-64" "-march=mips32 -32"
815 run_dump_test "mips16-intermix"
817 run_dump_test "vxworks1"
818 run_dump_test "vxworks1-xgot"
819 run_dump_test "vxworks1-el"
820 run_dump_test "vxworks1-xgot-el"
822 run_dump_test "noreorder"
823 run_dump_test "align"
824 run_dump_test "align2"
825 run_dump_test "align2-el"
826 run_dump_test "odd-float"
828 run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \
829 [mips_arch_list_matching mips2]
830 run_list_test_arches "mips-macro-ill-nofp" "-32 -msoft-float" \
831 [mips_arch_list_matching mips2]
833 run_list_test_arches "mips-hard-float-flag" \
834 "-32 -msoft-float -mhard-float" \
835 [mips_arch_list_matching mips1]
836 run_list_test_arches "mips-double-float-flag" \
837 "-32 -msingle-float -mdouble-float" \
838 [mips_arch_list_matching mips1]
840 run_dump_test "mips16-vis-1"
841 run_dump_test "call-nonpic-1"
842 run_dump_test "mips32-sync"
844 if $has_newabi { run_dump_test "cfi-n64-1" }
846 run_dump_test_arches "aent" [mips_arch_list_matching mips1]