Initial revision
[binutils.git] / gas / testsuite / gas / mips / mips.exp
blob1b5269d963610560d7c8a4a709317fdf0a483a1e
2 # Some generic MIPS tests
4 if [istarget mips*-*-*] then {
5 set no_mips16 0
6 set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] ]
7 set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
8 set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*]]
9 set ilocks [istarget mipstx39*-*-*]
10 set gpr_ilocks [expr [istarget mipstx39*-*-*]]
11 set addr32 [expr [istarget mipstx39*-*-*]]
17 run_dump_test "abs"
18 run_dump_test "add"
19 run_dump_test "and"
20 run_dump_test "break20"
21 run_dump_test "trap20"
22 run_dump_test "beq"
23 run_dump_test "bge"
24 run_dump_test "bgeu"
25 run_dump_test "blt"
26 run_dump_test "bltu"
27 if !$ilocks { run_dump_test "div" } else { run_dump_test "div-ilocks" }
28 run_dump_test "dli"
29 run_dump_test "jal"
30 if $svr4pic { run_dump_test "jal-svr4pic" }
31 if $svr4pic { run_dump_test "jal-xgot" }
32 if $empic { run_dump_test "jal-empic" }
33 if !$aout { run_dump_test "la" }
34 if $svr4pic { run_dump_test "la-svr4pic" }
35 if $svr4pic { run_dump_test "la-xgot" }
36 if $empic { run_dump_test "la-empic" }
37 if !$aout { run_dump_test "lb" }
38 if $svr4pic { run_dump_test "lb-svr4pic" }
39 if $svr4pic {
40 # Both versions specify the cpu, so we can run both regardless of
41 # the interlocking in the configured default cpu.
42 run_dump_test "lb-xgot"
43 run_dump_test "lb-xgot-ilocks"
45 if $empic { run_dump_test "lb-empic" }
46 if !$aout {
47 if !$gpr_ilocks {
48 run_dump_test "ld"
49 } else {
50 if !$addr32 {
51 run_dump_test "ld-ilocks"
52 } else {
53 run_dump_test "ld-ilocks-addr32"
57 if $svr4pic { run_dump_test "ld-svr4pic" }
58 if $svr4pic { run_dump_test "ld-xgot" }
59 if $empic { run_dump_test "ld-empic" }
60 run_dump_test "li"
61 if !$aout { run_dump_test "lifloat" }
62 if $svr4pic { run_dump_test "lif-svr4pic" }
63 if $svr4pic { run_dump_test "lif-xgot" }
64 if $empic { run_dump_test "lif-empic" }
65 run_dump_test "mips4"
66 if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
67 run_dump_test "rol"
68 if !$aout { run_dump_test "sb" }
69 run_dump_test "trunc"
70 if !$aout { run_dump_test "ulh" }
71 if $svr4pic { run_dump_test "ulh-svr4pic" }
72 if $svr4pic { run_dump_test "ulh-xgot" }
73 if $empic { run_dump_test "ulh-empic" }
74 if !$aout {
75 run_dump_test "ulw"
76 run_dump_test "uld"
77 run_dump_test "ush"
78 run_dump_test "usw"
79 run_dump_test "usd"
81 # The mips16 test can only be run on ELF, because only ELF
82 # supports the necessary mips16 reloc.
83 if { $svr4pic && !$no_mips16 } { run_dump_test "mips16" }
84 run_dump_test "delay"
85 run_dump_test "nodelay"
86 run_dump_test "mips4010"
87 run_dump_test "mips4650"
88 run_dump_test "mips4100"
89 run_dump_test "lineno"
90 run_dump_test "sync"
92 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
93 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
94 # and verify that they're the same. Specifically, we're checking
95 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
96 # instruction does get used. In previous versions of GAS,
97 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
98 run_dump_test "elf_e_flags1"
99 run_dump_test "elf_e_flags2"
100 run_dump_test "elf_e_flags3"
101 run_dump_test "elf_e_flags4"