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