2 # Some generic MIPS tests
4 if { [istarget mips*-*-*] } then {
6 set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
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*-*-*]]
13 if { [istarget mips*el-*-*] || [istarget "mips*-*-*linux*"] } then {
22 run_dump_test "break20"
23 run_dump_test "trap20"
29 if !$ilocks { run_dump_test "div" } else { run_dump_test "div-ilocks" }
32 if $svr4pic { run_dump_test "jal-svr4pic" }
33 if $svr4pic { run_dump_test "jal-xgot" }
34 if $empic { run_dump_test "jal-empic" }
35 if !$aout { run_dump_test "la" }
36 if $svr4pic { run_dump_test "la-svr4pic" }
37 if $svr4pic { run_dump_test "la-xgot" }
38 if $empic { run_dump_test "la-empic" }
39 if !$aout { run_dump_test "lb" }
40 if $svr4pic { run_dump_test "lb-svr4pic" }
42 # Both versions specify the cpu, so we can run both regardless of
43 # the interlocking in the configured default cpu.
44 run_dump_test "lb-xgot"
45 run_dump_test "lb-xgot-ilocks"
47 if $empic { run_dump_test "lb-empic" }
53 run_dump_test "ld-ilocks"
55 run_dump_test "ld-ilocks-addr32"
59 if $svr4pic { run_dump_test "ld-svr4pic" }
60 if $svr4pic { run_dump_test "ld-xgot" }
61 if $empic { run_dump_test "ld-empic" }
63 if !$aout { run_dump_test "lifloat" }
64 if $svr4pic { run_dump_test "lif-svr4pic" }
65 if $svr4pic { run_dump_test "lif-xgot" }
66 if $empic { run_dump_test "lif-empic" }
68 if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
70 if !$aout { run_dump_test "sb" }
72 if !$aout { run_dump_test "ulh" }
73 if $svr4pic { run_dump_test "ulh-svr4pic" }
74 if $svr4pic { run_dump_test "ulh-xgot" }
75 if $empic { run_dump_test "ulh-empic" }
83 # The mips16 test can only be run on ELF, because only ELF
84 # supports the necessary mips16 reloc.
85 if { $svr4pic && !$no_mips16 } { run_dump_test "mips16" }
87 run_dump_test "nodelay"
88 run_dump_test "mips4010"
89 run_dump_test "mips4650"
90 run_dump_test "mips4100"
91 run_dump_test "lineno"
93 run_dump_test "mips32"
94 run_dump_test "mips64"
97 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
98 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
99 # and verify that they're the same. Specifically, we're checking
100 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
101 # instruction does get used. In previous versions of GAS,
102 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
103 run_dump_test "elf_e_flags1"
104 run_dump_test "elf_e_flags2"
105 run_dump_test "elf_e_flags3"
106 run_dump_test "elf_e_flags4"
108 if [istarget mips*el-*-*] {
109 run_dump_test "elfel-rel"
111 run_dump_test "elf-rel"
114 if [istarget mips64*-*-*] {
115 if [istarget mips*el-*-*] {
116 run_dump_test "elfel-rel2"
118 run_dump_test "elf-rel2"
121 if [istarget mips*el-*-*] {
122 run_dump_test "e32el-rel2"
124 run_dump_test "e32-rel2"
128 if [istarget mips*el-*-*] {
129 run_dump_test "${tmips}elempic"
131 run_dump_test "${tmips}empic"
135 if [istarget mips*el-*-*] {
136 run_dump_test "${tmips}mipsel16-e"
138 run_dump_test "${tmips}mips16-e"
140 setup_xfail "mips*-*-*"
141 if [istarget mips*el-*-*] {
142 run_dump_test "mipsel16-f"
144 run_dump_test "mips16-f"