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