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