* gas/mips/mips.exp: Run the new tests, below.
[binutils-gdb.git] / gas / testsuite / gas / mips / mips.exp
1 #
2 # Some generic MIPS tests
3 #
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*-*-*]]
12
13 # start-sanitize-tx19
14 set ilocks [expr $ilocks || [istarget mipstx19*-*-*]]
15 set gpr_ilocks [expr $gpr_ilocks || [istarget mipstx19*-*-*]]
16 # end-sanitize-tx19
17
18 # start-sanitize-vr4320
19 set ilocks [expr $ilocks || [istarget mips64vr4320*-*-*]]
20
21 # end-sanitize-vr4320
22 #start-sanitize-tx49
23 set ilocks [expr $ilocks || [istarget mips64tx49*-*-*]]
24 set no_mips16 [expr $no_mips16 || [istarget mips64tx49*-*-*]]
25 #end-sanitize-tx49
26
27 # start-sanitize-cygnus
28 set ilocks [expr $ilocks || [istarget mips64vr5400*-*-*]]
29 set gpr_ilocks [expr $gpr_ilocks || [istarget mips64vr5400*-*-*]]
30 # end-sanitize-cygnus
31
32 # start-sanitize-r5900
33 set ilocks [expr $ilocks || [istarget mips64r5900*-*-*]]
34 set gpr_ilocks [expr $gpr_ilocks || [istarget mips64r5900*-*-*]]
35 # end-sanitize-r5900
36
37 run_dump_test "abs"
38 run_dump_test "add"
39 run_dump_test "and"
40 run_dump_test "break20"
41 # start-sanitize-r5900
42 run_dump_test "break5900"
43 # end-sanitize-r5900
44 run_dump_test "trap20"
45 run_dump_test "beq"
46 run_dump_test "bge"
47 run_dump_test "bgeu"
48 run_dump_test "blt"
49 run_dump_test "bltu"
50 if !$ilocks { run_dump_test "div" } else { run_dump_test "div-ilocks" }
51 run_dump_test "dli"
52 run_dump_test "jal"
53 if $svr4pic { run_dump_test "jal-svr4pic" }
54 if $svr4pic { run_dump_test "jal-xgot" }
55 if $empic { run_dump_test "jal-empic" }
56 if !$aout { run_dump_test "la" }
57 if $svr4pic { run_dump_test "la-svr4pic" }
58 if $svr4pic { run_dump_test "la-xgot" }
59 if $empic { run_dump_test "la-empic" }
60 if !$aout { run_dump_test "lb" }
61 if $svr4pic { run_dump_test "lb-svr4pic" }
62 if $svr4pic {
63 # Both versions specify the cpu, so we can run both regardless of
64 # the interlocking in the configured default cpu.
65 run_dump_test "lb-xgot"
66 run_dump_test "lb-xgot-ilocks"
67 }
68 if $empic { run_dump_test "lb-empic" }
69 if !$aout {
70 if !$gpr_ilocks {
71 run_dump_test "ld"
72 } else {
73 if !$addr32 {
74 run_dump_test "ld-ilocks"
75 } else {
76 run_dump_test "ld-ilocks-addr32"
77 }
78 }
79 }
80 if $svr4pic { run_dump_test "ld-svr4pic" }
81 if $svr4pic { run_dump_test "ld-xgot" }
82 if $empic { run_dump_test "ld-empic" }
83 run_dump_test "li"
84 if !$aout { run_dump_test "lifloat" }
85 if $svr4pic { run_dump_test "lif-svr4pic" }
86 if $svr4pic { run_dump_test "lif-xgot" }
87 if $empic { run_dump_test "lif-empic" }
88 run_dump_test "mips4"
89 if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
90 run_dump_test "rol"
91 if !$aout { run_dump_test "sb" }
92 run_dump_test "trunc"
93 if !$aout { run_dump_test "ulh" }
94 if $svr4pic { run_dump_test "ulh-svr4pic" }
95 if $svr4pic { run_dump_test "ulh-xgot" }
96 if $empic { run_dump_test "ulh-empic" }
97 if !$aout {
98 run_dump_test "ulw"
99 run_dump_test "uld"
100 run_dump_test "ush"
101 run_dump_test "usw"
102 run_dump_test "usd"
103 }
104 # The mips16 test can only be run on ELF, because only ELF
105 # supports the necessary mips16 reloc.
106 if { $svr4pic && !$no_mips16 } { run_dump_test "mips16" }
107 run_dump_test "delay"
108 run_dump_test "nodelay"
109 # start-sanitize-cygnus
110 run_dump_test "vr5400"
111 # end-sanitize-cygnus
112 # start-sanitize-r5900
113 run_dump_test "r5900"
114 run_dump_test "vu0"
115 # end-sanitize-r5900
116 run_dump_test "mips4010"
117 run_dump_test "mips4650"
118 run_dump_test "mips4100"
119 run_dump_test "lineno"
120 run_dump_test "sync"
121
122 # Make sure that -mcpu=FOO and -mFOO are equivalent. Assemble a file
123 # containing 4650-specific instructions with -m4650 and -mcpu=4650,
124 # and verify that they're the same. Specifically, we're checking
125 # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
126 # instruction does get used. In previous versions of GAS,
127 # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
128 run_dump_test "elf_e_flags1"
129 run_dump_test "elf_e_flags2"
130 run_dump_test "elf_e_flags3"
131 run_dump_test "elf_e_flags4"
132 }