* gas/mips/elf-rel-got-n32.d, gas/mips/elf-rel-got-n32.s,
[platform/upstream/binutils.git] / gas / testsuite / gas / mips / mips.exp
1 #
2 # Some generic MIPS tests
3 #
4
5 # When adding a new test to this file, try to do the following things:
6 #
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). 
10 #
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."
14 #
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.
19
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.
25
26
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.
32
33
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:
39 #
40 # displayname: The name of the entry to be used for pretty-printing.
41 #
42 # gprsize: The size in bits of General Purpose Registers provided by
43 # the architecture (must be 32 or 64).
44 #
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)
52 # tests:
53 #
54 #       mips1, mips2, mips3, mips4, mips5, mips32, mips64
55 #               The architecture includes the instructions defined
56 #               by that MIPS ISA.
57 #
58 #       gpr_ilocks
59 #               The architecture interlocks GPRs accesses.  (That is,
60 #               there are no load delay slots.)
61 #
62 #       mips3d  The architecture includes the MIPS-3D ASE.
63 #
64 #       ror     The architecture includes hardware rotate instructions.
65 #
66 #       gpr32, gpr64
67 #               The architecture provides 32- or 64-bit General Purpose
68 #               Registers.
69 #
70 # as_flags: The assembler flags used when assembling tests for this
71 # architecture.
72 #
73 # objdump_flags: The objdump flags used when disassembling tests for
74 # this architecture.
75 #
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."
80
81 # mips_arch_create ARCH GPRSIZE EXTENDS PROPS AS_FLAGS OBJDUMP_FLAGS \
82 #                  (optional:) DEFAULT_FOR_TARGETS
83 #
84 # This function creates a new entry in the architecture data array,
85 # for the architecture or CPU named ARCH, and fills in the entry
86 # according to the rest of the arguments.
87 #
88 # The new entry's property list is initialized to contain ARCH, any
89 # properties specified by PROPS, and the properties associated with
90 # the entry specified by EXTENDS.  (The new architecture is considered
91 # to extend the capabilities provided by that architecture.)
92 #
93 # If DEFAULT_FOR_TARGETS is specified, it is a list of targets for which
94 # this architecture is the default architecture.  If "istarget" returns
95 # true for any of the targets in the list, a "default" entry will be
96 # added to the architecture array which indicates that ARCH is the default
97 # architecture.
98 proc mips_arch_create {arch gprsize extends props as_flags objdump_flags
99                        {default_for_targets {}}} {
100     global mips_arches
101
102     if { [info exists mips_arches($arch)] } {
103              error "mips_arch_create: arch \"$arch\" already exists"
104     }
105     if { $gprsize != 32 && $gprsize != 64 } {
106         error "mips_arch_create: invalid GPR size $gprsize"
107     }
108
109     set archdata(displayname) $arch
110     set archdata(gprsize) $gprsize
111     set archdata(as_flags) $as_flags
112     set archdata(objdump_flags) $objdump_flags
113     set archdata(props) $arch
114     eval lappend archdata(props) $props
115     if { [string length $extends] != 0 } {
116         eval lappend archdata(props) [mips_arch_properties $extends 0]
117     }
118
119     set mips_arches($arch) [array get archdata]
120
121     # Set as default if appropriate.
122     foreach target $default_for_targets {
123         if { [istarget $target] } {
124             if { [info exists mips_arches(default)] } {
125                 error "mips_arch_create: default arch already exists"
126             }
127
128             set archdata(displayname) "default = $arch"
129             set archdata(as_flags) ""
130             set archdata(objdump_flags) ""
131
132             set mips_arches(default) [array get archdata]
133             break
134         }
135     }
136 }
137
138 # mips_arch_list_all
139 #
140 # This function returns the list of all names of entries in the
141 # architecture data array (including the default entry, if a default
142 # is known).
143 proc mips_arch_list_all {} {
144     global mips_arches
145     return [lsort -dictionary [array names mips_arches]]
146 }
147
148 # mips_arch_data ARCH
149 #
150 # This function returns the information associated with ARCH
151 # in the architecture data array, in "array get" form.
152 proc mips_arch_data {arch} {
153     global mips_arches
154
155     if { ! [info exists mips_arches($arch)] } {
156         error "mips_arch_data: unknown arch \"$arch\""
157     }
158     return $mips_arches($arch)
159 }
160
161 # mips_arch_displayname ARCH
162 #
163 # This function returns the printable name associated with ARCH in
164 # the architecture data array.
165 proc mips_arch_displayname {arch} {
166     array set archdata [mips_arch_data $arch]
167     return $archdata(displayname)
168 }
169
170 # mips_arch_properties ARCH (optional:) INCLUDE_GPRSIZE
171 #
172 # This function returns the property list associated with ARCH in the
173 # architecture data array.  If INCLUDE_GPRSIZE is non-zero, an additional
174 # "gpr32" or "gpr64" property will be returned as part of the list based
175 # on the architecture's GPR size.
176 proc mips_arch_properties {arch {include_gprsize 1}} {
177     array set archdata [mips_arch_data $arch]
178     set props $archdata(props)
179     if { $include_gprsize } {
180         lappend props gpr$archdata(gprsize)
181     }
182     return $props
183 }
184
185 # mips_arch_as_flags ARCH
186 #
187 # This function returns the assembler flags associated with ARCH in
188 # the architecture data array. 
189 proc mips_arch_as_flags {arch} {
190     array set archdata [mips_arch_data $arch]
191     return $archdata(as_flags)
192 }
193
194 # mips_arch_objdump_flags ARCH
195 #
196 # This function returns the objdump disassembly flags associated with
197 # ARCH in the architecture data array. 
198 proc mips_arch_objdump_flags {arch} {
199     array set archdata [mips_arch_data $arch]
200     return $archdata(objdump_flags)
201 }
202
203 # mips_arch_matches ARCH PROPMATCHLIST
204 #
205 # This function returns non-zero if ARCH matches the set of properties
206 # described by PROPMATCHLIST.  Each entry in PROPMATCHLIST can either
207 # be the name of a property which must be matched, or "!" followed by
208 # the name of a property which must not be matched.  ARCH matches
209 # PROPMATCHLIST if and only if all of the conditions specified by
210 # PROPMATCHLIST are satisfied.
211 proc mips_arch_matches {arch propmatchlist} {
212     foreach pm $propmatchlist {
213         if { [string match {!*} $pm] } {
214             # fail if present.
215             set inverted 1
216             set p [string range $pm 1 end]
217         } {
218             # fail if not present.
219             set inverted 0
220             set p $pm
221         }
222
223         set loc [lsearch -exact [mips_arch_properties $arch] $p]
224
225         # required-absent and found, or required-present and not found: fail.
226         if { ($inverted && $loc != -1) || (! $inverted && $loc == -1) } {
227             return 0
228         }
229     }
230     return 1
231 }
232
233 # mips_arch_list_matching ARGS
234 #
235 # This function returns a list of all architectures which match
236 # the conditions described by its arguments.  Its arguments are
237 # taken as a list and used as the PROPMATCHLIST in a call to
238 # "mips_arch_matches" for each known architecture.
239 proc mips_arch_list_matching {args} {
240     set l ""
241     foreach arch [mips_arch_list_all] {
242         # For now, don't match default arch until we know what its
243         # properties actually are.
244         if { [string compare $arch default] == 0
245              && [string length [mips_arch_properties default]] == 0} {
246             continue;
247         }
248         if { [mips_arch_matches $arch $args] } {
249             lappend l $arch
250         }
251     }
252     return $l
253 }
254
255
256 # The functions below facilitate running various types of tests.
257
258 # run_dump_test_arch NAME ARCH
259 #
260 # Invoke "run_dump_test" for test NAME, with extra assembler and
261 # disassembler flags to test architecture ARCH.
262 proc run_dump_test_arch { name arch } {
263     global subdir
264
265     if [catch {run_dump_test $name \
266                              "{name    {([mips_arch_displayname $arch])}}
267                               {objdump {[mips_arch_objdump_flags $arch]}}
268                               {as      {[mips_arch_as_flags $arch]}}"} rv] {
269         perror "$rv"
270         untested "$subdir/$name ($arch)"
271     }
272 }
273
274 # run_dump_test_arches NAME ARCH_LIST
275 #
276 # Invoke "run_dump_test_arch" for test NAME, for each architecture
277 # listed in ARCH_LIST.
278 proc run_dump_test_arches { name arch_list } {
279     foreach arch $arch_list {
280         run_dump_test_arch "$name" "$arch"
281     }
282 }
283
284 # run_list_test NAME OPTS (optional): TESTNAME
285 #
286 # Assemble the file "NAME.d" and compare the assembler standard error
287 # output against the regular expressions given in the file "NAME.l".
288 # The assembler is passed the flags given in OPTS.  If TESTNAME is
289 # provided, it will be used as the name of the test.
290 proc run_list_test { name opts {testname {}} } {
291     global srcdir subdir
292     if { [string length $testname] == 0 } then {
293             set testname "MIPS $name"
294     }
295     set file $srcdir/$subdir/$name
296     gas_run ${name}.s $opts ">&dump.out"
297     if { [regexp_diff "dump.out" "${file}.l"] } then {
298         fail $testname
299         verbose "output is [file_contents "dump.out"]" 2
300         return
301     }
302     pass $testname
303 }
304
305 # run_list_test_arch NAME OPTS ARCH
306 #
307 # Invoke "run_list_test" for test NAME with options OPTS, with extra
308 # assembler flags to test architecture ARCH.
309 proc run_list_test_arch { name opts arch } {
310     global subdir
311
312     set testname "MIPS $name ([mips_arch_displayname $arch])"
313     if [catch {run_list_test "$name" "$opts [mips_arch_as_flags $arch]" \
314                              "$testname"} rv] {
315         perror "$rv"
316         untested "$testname"
317     }
318 }
319
320 # run_list_test_arches NAME OPTS ARCH_LIST
321 #
322 # Invoke "run_list_test_arch" for test NAME with options OPTS, for each
323 # architecture listed in ARCH_LIST.
324 proc run_list_test_arches { name opts arch_list } {
325     foreach arch $arch_list {
326         run_list_test_arch "$name" "$opts" "$arch"
327     }
328 }
329
330
331 # Create the architecture data array by providing data for all
332 # known architectures.
333 #
334 # Note that several targets pick default CPU based on ABI.  We
335 # can't easily handle that; do NOT list those targets as defaulting
336 # to any architecture.
337 mips_arch_create mips1  32      {}      {} \
338                         { -march=mips1 -mtune=mips1 } { -mmips:3000 }
339 mips_arch_create mips2  32      mips1   { gpr_ilocks } \
340                         { -march=mips2 -mtune=mips2 } { -mmips:6000 }
341 mips_arch_create mips3  64      mips2   {} \
342                         { -march=mips3 -mtune=mips3 } { -mmips:4000 }
343 mips_arch_create mips4  64      mips3   {} \
344                         { -march=mips4 -mtune=mips4 } { -mmips:8000 }
345 mips_arch_create mips5  64      mips4   {} \
346                         { -march=mips5 -mtune=mips5 } { -mmips:mips5 }
347 mips_arch_create mips32 32      mips2   {} \
348                         { -march=mips32 -mtune=mips32 } { -mmips:isa32 } \
349                         { mipsisa32-*-* mipsisa32el-*-* }
350 mips_arch_create mips32r2 32    mips32  { ror } \
351                         { -march=mips32r2 -mtune=mips32r2 } \
352                         { -mmips:isa32r2 } \
353                         { mipsisa32r2-*-* mipsisa32r2el-*-* }
354 mips_arch_create mips64 64      mips5   { mips32 } \
355                         { -march=mips64 -mtune=mips64 } { -mmips:isa64 } \
356                         { mipsisa64-*-* mipsisa64el-*-* }
357 mips_arch_create r3000  32      mips1   {} \
358                         { -march=r3000 -mtune=r3000 } { -mmips:3000 }
359 mips_arch_create r3900  32      mips1   { gpr_ilocks } \
360                         { -march=r3900 -mtune=r3900 } { -mmips:3900 } \
361                         { mipstx39-*-* mipstx39el-*-* }
362 mips_arch_create r4000  64      mips3   {} \
363                         { -march=r4000 -mtune=r4000 } { -mmips:4000 }
364 mips_arch_create vr5400 64      mips4   { ror } \
365                         { -march=vr5400 -mtune=vr5400 } { -mmips:5400 }
366 mips_arch_create sb1    64      mips64  { mips3d } \
367                         { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
368                         { mipsisa64sb1-*-* mipsisa64sb1el-*-* }
369
370
371 #
372 # And now begin the actual tests!
373 #
374
375 if { [istarget mips*-*-*] } then {
376     set no_mips16 0
377     set elf [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] || [istarget *-*-netbsd*] ]
378     set ecoff [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
379     set aout [expr [istarget *-*-bsd*] || [istarget *-*-openbsd*] ]
380     set ilocks [istarget mipstx39*-*-*]
381     set gpr_ilocks [expr [istarget mipstx39*-*-*]]
382     set addr32 [expr [istarget mipstx39*-*-*]]
383     set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
384
385     if { [istarget "mips*-*-*linux*"] } then {
386         set tmips "t"
387     } else {
388         set tmips ""
389     }
390     if [istarget mips*el-*-*] {
391         set el el
392     } {
393         set el ""
394     }
395
396     run_dump_test_arches "abs"          [mips_arch_list_matching mips1]
397     run_dump_test_arches "add"          [mips_arch_list_matching mips1]
398     run_dump_test_arches "and"          [mips_arch_list_matching mips1]
399     run_dump_test "break20"
400     run_dump_test "trap20"
401
402     # LOSE: As of 2002-02-08, "beq" through "bltu" fail for target mips-ecoff.
403     # See http://sources.redhat.com/ml/binutils/2001-10/msg00418.html for
404     # more information.  Not sure if the fixes there are correct; should
405     # branches to external labels be allowed for ECOFF?
406     # XXX FIXME: the following tests require -mips2 disasm for
407     # branch-likely instructions.  They should be split.
408     run_dump_test_arches "beq"          [mips_arch_list_matching mips2]
409     run_dump_test_arches "bge"          [mips_arch_list_matching mips2]
410     run_dump_test_arches "bgeu"         [mips_arch_list_matching mips2]
411     run_dump_test_arches "blt"          [mips_arch_list_matching mips2]
412     run_dump_test_arches "bltu"         [mips_arch_list_matching mips2]
413     run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
414     run_list_test_arches "branch-misc-2" "" [mips_arch_list_matching mips1]
415
416     if $ilocks {
417         run_dump_test "div-ilocks"
418     } else {
419         run_dump_test "div"
420     }
421     run_dump_test_arches "dli"          [mips_arch_list_matching mips3]
422     if $elf {
423         run_dump_test_arches "elf-jal"  [mips_arch_list_matching mips1]
424     } else {
425         run_dump_test "jal"
426     }
427     if $elf { run_dump_test "jal-svr4pic" }
428     if $elf { run_dump_test "jal-xgot" }
429     # LOSE: As of 2002-02-08, the jal-empic test fails for target mips-ecoff.
430     # It appears that it broke between 2000-03-11 00:00UTC and
431     # 2000-03-12 00:00 UTC.
432     if $ecoff { run_dump_test "jal-empic" }
433     if $elf {
434         run_dump_test_arches "jal-empic-elf" [mips_arch_list_matching mips1]
435         run_dump_test_arches "jal-empic-elf-2" [mips_arch_list_matching mips1]
436         run_dump_test_arches "jal-empic-elf-3" [mips_arch_list_matching mips1]
437     }
438     run_list_test_arches "jal-range" "" [mips_arch_list_matching mips1]
439     if !$aout { run_dump_test "la" }
440     if $elf { run_dump_test "la-svr4pic" }
441     if $elf { run_dump_test "la-xgot" }
442     # LOSE: As of 2002-02-08, the la-empic test fails for target mips-ecoff.
443     # Not sure when it first cropped up, but may be related to addition of
444     # "la" -> "addiu" pattern in MIPS opcode table long ago.
445     if $ecoff { run_dump_test "la-empic" }
446     if !$aout {
447         # XXX FIXME: Has mips2 and later insns with mips1 disassemblies.
448         # (Should split and then use appropriate arch lists.)
449         run_dump_test_arches "lb"       [mips_arch_list_matching !mips2]
450     }
451     if $elf {
452         run_dump_test_arches "lb-svr4pic" [mips_arch_list_matching mips1]
453     }
454     if $elf {
455         # Both versions specify the cpu, so we can run both regardless of
456         # the interlocking in the configured default cpu.
457         run_dump_test "lb-xgot"
458         run_dump_test "lb-xgot-ilocks"
459     }
460     if $ecoff { run_dump_test "lb-empic" }
461     if !$aout {
462         if !$gpr_ilocks {
463             run_dump_test "ld"
464         } else { 
465             if !$addr32 {
466                 run_dump_test "ld-ilocks"
467             } else {
468                 run_dump_test "ld-ilocks-addr32"
469             }
470         }
471     }
472     if $elf { run_dump_test "ld-svr4pic" }
473     if $elf { run_dump_test "ld-xgot" }
474     if $ecoff { run_dump_test "ld-empic" }
475     run_dump_test_arches "li"           [mips_arch_list_matching mips1]
476     if !$aout { run_dump_test "lifloat" }
477     if $elf { run_dump_test "lif-svr4pic" }
478     if $elf { run_dump_test "lif-xgot" }
479     # LOSE: As of 2002-02-08, the lif-empic test fails for target mips-ecoff.
480     # It appears that it broke between 2000-03-11 00:00UTC and
481     # 2000-03-12 00:00 UTC.
482     if $ecoff { run_dump_test "lif-empic" }
483     run_dump_test_arches "mips4"        [mips_arch_list_matching mips4]
484     run_dump_test_arches "mips5"        [mips_arch_list_matching mips5]
485     if $ilocks {
486         run_dump_test "mul-ilocks"
487     } else {
488         run_dump_test "mul"
489     }
490
491     run_dump_test_arches "rol"          [mips_arch_list_matching !ror]
492     run_dump_test_arches "rol-hw"       [mips_arch_list_matching ror]
493
494     run_dump_test_arches "rol64"        [mips_arch_list_matching gpr64 !ror]
495     run_dump_test_arches "rol64-hw"     [mips_arch_list_matching gpr64 ror]
496
497     if !$aout { run_dump_test "sb" }
498     run_dump_test "trunc"
499     if !$aout { run_dump_test "ulh" }
500     run_dump_test_arches "ulh2-eb"      [mips_arch_list_matching mips1]
501     run_dump_test_arches "ulh2-el"      [mips_arch_list_matching mips1]
502     if $elf { run_dump_test "ulh-svr4pic" }
503     if $elf { run_dump_test "ulh-xgot" }
504     if $ecoff { run_dump_test "ulh-empic" }
505     if !$aout {
506         run_dump_test "ulw"
507         run_dump_test "uld"
508         run_dump_test "ush"
509         run_dump_test "usw"
510         run_dump_test "usd"
511     }
512     run_dump_test_arches "ulw2-eb"      [mips_arch_list_matching !gpr_ilocks]
513     run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks]
514     run_dump_test_arches "ulw2-el"      [mips_arch_list_matching !gpr_ilocks]
515     run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks]
516
517     run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3]
518     run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3]
519
520     # The mips16 test can only be run on ELF, because only ELF
521     # supports the necessary mips16 reloc.
522     if { $elf && !$no_mips16 } {
523         run_dump_test "mips16"
524         # Check jalx handling
525         run_dump_test "mips16-jalx"
526         run_dump_test "mips-jalx"
527     }
528     run_list_test "mips-no-jalx" ""
529     run_dump_test "delay"
530     run_dump_test "nodelay"
531     run_dump_test "mips4010"
532     run_dump_test "mips4650"
533     run_dump_test "mips4100"
534     run_dump_test "vr4111"
535     run_dump_test "vr4120"
536     run_dump_test "vr4122"
537     run_dump_test "vr5400"
538     run_dump_test "vr5500"
539     run_dump_test "perfcount"
540     run_dump_test "lineno"
541     run_dump_test "sync"
542
543     run_dump_test_arches "mips32"       [mips_arch_list_matching mips32]
544
545     run_dump_test_arches "mips32r2"     [mips_arch_list_matching mips32r2]
546     run_list_test_arches "mips32r2-ill" "" [mips_arch_list_matching mips32r2]
547
548     run_dump_test_arches "mips64"       [mips_arch_list_matching mips64]
549
550     run_dump_test "mips64-mips3d"
551     run_dump_test_arches "mips64-mips3d-incl" [mips_arch_list_matching mips3d]
552
553     run_dump_test "mips64-mdmx"
554     run_dump_test "sb1-ext-mdmx"
555     run_dump_test "sb1-ext-ps"
556
557     run_dump_test "relax"
558
559     run_list_test "illegal" ""
560     run_list_test "baddata1" ""
561
562     # LOSE: As of 2002-02-08, the next 4 tests fail for target mips-ecoff.
563     # It's unknown whether they _should_ pass as-is, or whether different
564     # variants are needed for ELF and ECOFF.
565     run_dump_test "mips-gp32-fp32"
566     run_dump_test "mips-gp32-fp64"
567     run_dump_test "mips-gp64-fp32"
568     run_dump_test "mips-gp64-fp64"
569
570     if $elf {
571         # Make sure that -mcpu=FOO and -mFOO are equivalent.  Assemble a file
572         # containing 4650-specific instructions with -m4650 and -mcpu=4650,
573         # and verify that they're the same.  Specifically, we're checking
574         # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
575         # instruction does get used.  In previous versions of GAS,
576         # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
577         run_dump_test "elf_e_flags1"
578         run_dump_test "elf_e_flags2"
579         run_dump_test "elf_e_flags3"
580         run_dump_test "elf_e_flags4"
581
582         # Check EF_MIPS_ARCH markings for each supported architecture.
583         run_dump_test "elf_arch_mips1"
584         run_dump_test "elf_arch_mips2"
585         run_dump_test "elf_arch_mips3"
586         run_dump_test "elf_arch_mips4"
587         run_dump_test "elf_arch_mips5"
588         run_dump_test "elf_arch_mips32"
589         run_dump_test "elf_arch_mips32r2"
590         run_dump_test "elf_arch_mips64"
591
592         # Verify that ASE markings are handled properly.
593         if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
594
595         run_dump_test "mips-gp32-fp32-pic"
596         run_dump_test "mips-gp32-fp64-pic"
597         run_dump_test "mips-gp64-fp32-pic"
598         run_dump_test "mips-gp64-fp64-pic"
599
600         run_dump_test "mips-abi32"
601         run_dump_test "mips-abi32-pic"
602         run_dump_test "mips-abi32-pic2"
603
604         run_dump_test "elf${el}-rel"
605         if {[istarget mips64*-*-*] || [istarget mipsisa32*-*-*]
606             || [istarget mipsisa64*-*-*]} { 
607             run_dump_test "elf${el}-rel2"
608         } else {
609             run_dump_test "e32${el}-rel2"
610         }
611         run_dump_test "elf${el}-rel3"
612         if {[istarget mips64*-*-*]} {
613             run_dump_test "elf-rel4"
614         } else {
615             run_dump_test "e32-rel4"
616         }
617         run_dump_test "elf-rel5"
618         run_dump_test "elf-rel6"
619         run_dump_test "elf-rel7"
620         run_dump_test "elf-rel8"
621         run_dump_test "elf-rel9"
622         if $has_newabi {
623             run_dump_test "elf-rel10"
624             run_dump_test "elf-rel11"
625         }
626         run_dump_test "elf-rel12"
627         run_dump_test "elf-rel13"
628         run_dump_test "elf-rel14"
629
630         if $has_newabi {
631             run_dump_test "elf-rel-got-n32"
632             run_dump_test "elf-rel-xgot-n32"
633             run_dump_test "elf-rel-got-n64"
634             run_dump_test "elf-rel-xgot-n64"
635         }
636
637         run_dump_test "${tmips}${el}empic"
638         run_dump_test "empic2"
639         run_dump_test "empic3_e"
640         run_dump_test "empic3_g1"
641         run_dump_test "empic3_g2"
642         if { !$no_mips16 } {
643             run_dump_test "${tmips}mips${el}16-e"
644             run_dump_test "${tmips}mips${el}16-f"
645         }
646         run_dump_test "elf-consthilo"
647         run_dump_test "expr1"
648     }
649
650     if $has_newabi {
651         run_dump_test "n32-consec"
652     }
653
654     # tests of objdump's ability to disassemble using different
655     # register names.
656     run_dump_test "gpr-names-numeric"
657     run_dump_test "gpr-names-32"
658     run_dump_test "gpr-names-n32"
659     run_dump_test "gpr-names-64"
660
661     run_dump_test "fpr-names-numeric"
662     run_dump_test "fpr-names-32"
663     run_dump_test "fpr-names-n32"
664     run_dump_test "fpr-names-64"
665
666     run_dump_test "cp0-names-numeric"
667     run_dump_test "cp0-names-mips32"
668     run_dump_test "cp0-names-mips32r2"
669     run_dump_test "cp0-names-mips64"
670     run_dump_test "cp0-names-sb1"
671
672     run_dump_test "cp0sel-names-numeric"
673     run_dump_test "cp0sel-names-mips32"
674     run_dump_test "cp0sel-names-mips32r2"
675     run_dump_test "cp0sel-names-mips64"
676     run_dump_test "cp0sel-names-sb1"
677
678     run_dump_test "hwr-names-numeric"
679     run_dump_test "hwr-names-mips32r2"
680 }