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 run_dump_test "elf-jal"
36 if $svr4pic { run_dump_test "jal-svr4pic" }
37 if $svr4pic { run_dump_test "jal-xgot" }
38 if $empic { run_dump_test "jal-empic" }
39 if !$aout { run_dump_test "la" }
40 if $svr4pic { run_dump_test "la-svr4pic" }
41 if $svr4pic { run_dump_test "la-xgot" }
42 if $empic { run_dump_test "la-empic" }
43 if !$aout { run_dump_test "lb" }
44 if $svr4pic { run_dump_test "lb-svr4pic" }
46 # Both versions specify the cpu, so we can run both regardless of
47 # the interlocking in the configured default cpu.
48 run_dump_test "lb-xgot"
49 run_dump_test "lb-xgot-ilocks"
51 if $empic { run_dump_test "lb-empic" }
57 run_dump_test "ld-ilocks"
59 run_dump_test "ld-ilocks-addr32"
63 if $svr4pic { run_dump_test "ld-svr4pic" }
64 if $svr4pic { run_dump_test "ld-xgot" }
65 if $empic { run_dump_test "ld-empic" }
67 if !$aout { run_dump_test "lifloat" }
68 if $svr4pic { run_dump_test "lif-svr4pic" }
69 if $svr4pic { run_dump_test "lif-xgot" }
70 if $empic { run_dump_test "lif-empic" }
72 if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
74 if !$aout { run_dump_test "sb" }
76 if !$aout { run_dump_test "ulh" }
77 if $svr4pic { run_dump_test "ulh-svr4pic" }
78 if $svr4pic { run_dump_test "ulh-xgot" }
79 if $empic { run_dump_test "ulh-empic" }
87 # The mips16 test can only be run on ELF, because only ELF
88 # supports the necessary mips16 reloc.
89 if { $svr4pic && !$no_mips16 } { run_dump_test "mips16" }
91 run_dump_test "nodelay"
92 run_dump_test "mips4010"
93 run_dump_test "mips4650"
94 run_dump_test "mips4100"
95 # Linux uses ELF stabs, which doesn't support line number.
96 setup_xfail "mips*-*-*linux*"
97 run_dump_test "lineno"
99 run_dump_test "mips32"
100 run_dump_test "mips64"
103 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
104 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
105 # and verify that they're the same. Specifically, we're checking
106 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
107 # instruction does get used. In previous versions of GAS,
108 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
109 run_dump_test "elf_e_flags1"
110 run_dump_test "elf_e_flags2"
111 run_dump_test "elf_e_flags3"
112 run_dump_test "elf_e_flags4"
114 if [istarget mips*el-*-*] {
115 run_dump_test "elfel-rel"
117 run_dump_test "elf-rel"
120 if [istarget mips64*-*-*] {
121 if [istarget mips*el-*-*] {
122 run_dump_test "elfel-rel2"
124 run_dump_test "elf-rel2"
127 if [istarget mips*el-*-*] {
128 run_dump_test "e32el-rel2"
130 run_dump_test "e32-rel2"
134 if [istarget mips*el-*-*] {
135 run_dump_test "elfel-rel3"
137 run_dump_test "elf-rel3"
140 if [istarget mips*el-*-*] {
141 run_dump_test "${tmips}elempic"
143 run_dump_test "${tmips}empic"
147 if [istarget mips*el-*-*] {
148 run_dump_test "${tmips}mipsel16-e"
150 run_dump_test "${tmips}mips16-e"
152 setup_xfail "mips*-*-*"
153 if [istarget mips*el-*-*] {
154 run_dump_test "mipsel16-f"
156 run_dump_test "mips16-f"