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