2001-06-07 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / gas / testsuite / gas / mips / mips.exp
CommitLineData
252b5132
RH
1#
2# Some generic MIPS tests
3#
0285c67d 4if { [istarget mips*-*-*] } then {
252b5132 5 set no_mips16 0
de950844 6 set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
252b5132 7 set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
de950844 8 set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*] ]
252b5132
RH
9 set ilocks [istarget mipstx39*-*-*]
10 set gpr_ilocks [expr [istarget mipstx39*-*-*]]
11 set addr32 [expr [istarget mipstx39*-*-*]]
12
ff8715d0
L
13 if { [istarget mips*el-*-*] || [istarget "mips*-*-*linux*"] } then {
14 set tmips "t"
15 } else {
16 set tmips ""
17 }
252b5132
RH
18
19 run_dump_test "abs"
20 run_dump_test "add"
21 run_dump_test "and"
22 run_dump_test "break20"
23 run_dump_test "trap20"
24 run_dump_test "beq"
25 run_dump_test "bge"
26 run_dump_test "bgeu"
27 run_dump_test "blt"
28 run_dump_test "bltu"
29 if !$ilocks { run_dump_test "div" } else { run_dump_test "div-ilocks" }
30 run_dump_test "dli"
31 run_dump_test "jal"
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" }
41 if $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"
46 }
47 if $empic { run_dump_test "lb-empic" }
48 if !$aout {
49 if !$gpr_ilocks {
50 run_dump_test "ld"
51 } else {
52 if !$addr32 {
53 run_dump_test "ld-ilocks"
54 } else {
55 run_dump_test "ld-ilocks-addr32"
56 }
57 }
58 }
59 if $svr4pic { run_dump_test "ld-svr4pic" }
60 if $svr4pic { run_dump_test "ld-xgot" }
61 if $empic { run_dump_test "ld-empic" }
62 run_dump_test "li"
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" }
67 run_dump_test "mips4"
68 if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
69 run_dump_test "rol"
70 if !$aout { run_dump_test "sb" }
71 run_dump_test "trunc"
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" }
76 if !$aout {
77 run_dump_test "ulw"
78 run_dump_test "uld"
79 run_dump_test "ush"
80 run_dump_test "usw"
81 run_dump_test "usd"
82 }
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" }
86 run_dump_test "delay"
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"
92 run_dump_test "sync"
e7af610e 93 run_dump_test "mips32"
0808b8a9 94 run_dump_test "mips64"
252b5132 95
07147777 96 if $svr4pic {
2cd5676f
CD
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"
107
ff8715d0
L
108 if [istarget mips*el-*-*] {
109 run_dump_test "elfel-rel"
110 } {
111 run_dump_test "elf-rel"
112 }
113
07147777 114 if [istarget mips64*-*-*] {
ff8715d0
L
115 if [istarget mips*el-*-*] {
116 run_dump_test "elfel-rel2"
117 } {
118 run_dump_test "elf-rel2"
119 }
120 } {
121 if [istarget mips*el-*-*] {
122 run_dump_test "e32el-rel2"
123 } {
124 run_dump_test "e32-rel2"
125 }
126 }
127
a90335ee
L
128 if [istarget mips*el-*-*] {
129 run_dump_test "elfel-rel3"
130 } {
131 run_dump_test "elf-rel3"
132 }
133
ff8715d0
L
134 if [istarget mips*el-*-*] {
135 run_dump_test "${tmips}elempic"
07147777 136 } {
ff8715d0
L
137 run_dump_test "${tmips}empic"
138 }
139
bb2d6cd7 140 if { !$no_mips16 } {
ff8715d0
L
141 if [istarget mips*el-*-*] {
142 run_dump_test "${tmips}mipsel16-e"
143 } {
144 run_dump_test "${tmips}mips16-e"
145 }
bb2d6cd7 146 setup_xfail "mips*-*-*"
ff8715d0
L
147 if [istarget mips*el-*-*] {
148 run_dump_test "mipsel16-f"
149 } {
150 run_dump_test "mips16-f"
151 }
bb2d6cd7 152 }
07147777 153 }
252b5132 154}
This page took 0.08618 seconds and 4 git commands to generate.