summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/mips/mips.exp
blob: 1b5269d963610560d7c8a4a709317fdf0a483a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Some generic MIPS tests
#
if [istarget mips*-*-*] then {
    set no_mips16 0
    set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] ]
    set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
    set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*]]
    set ilocks [istarget mipstx39*-*-*]
    set gpr_ilocks [expr [istarget mipstx39*-*-*]]
    set addr32 [expr [istarget mipstx39*-*-*]]





    run_dump_test "abs"
    run_dump_test "add"
    run_dump_test "and"
    run_dump_test "break20"
    run_dump_test "trap20"
    run_dump_test "beq"
    run_dump_test "bge"
    run_dump_test "bgeu"
    run_dump_test "blt"
    run_dump_test "bltu"
    if !$ilocks { run_dump_test "div" } else { run_dump_test "div-ilocks" }
    run_dump_test "dli"
    run_dump_test "jal"
    if $svr4pic { run_dump_test "jal-svr4pic" }
    if $svr4pic { run_dump_test "jal-xgot" }
    if $empic { run_dump_test "jal-empic" }
    if !$aout { run_dump_test "la" }
    if $svr4pic { run_dump_test "la-svr4pic" }
    if $svr4pic { run_dump_test "la-xgot" }
    if $empic { run_dump_test "la-empic" }
    if !$aout { run_dump_test "lb" }
    if $svr4pic { run_dump_test "lb-svr4pic" }
    if $svr4pic {
	# Both versions specify the cpu, so we can run both regardless of
	# the interlocking in the configured default cpu.
	run_dump_test "lb-xgot"
	run_dump_test "lb-xgot-ilocks"
    }
    if $empic { run_dump_test "lb-empic" }
    if !$aout { 
        if !$gpr_ilocks { 
            run_dump_test "ld" 
        } else { 
            if !$addr32 {
                run_dump_test "ld-ilocks"
            } else {
                run_dump_test "ld-ilocks-addr32"
            }
        }
    }
    if $svr4pic { run_dump_test "ld-svr4pic" }
    if $svr4pic { run_dump_test "ld-xgot" }
    if $empic { run_dump_test "ld-empic" }
    run_dump_test "li"
    if !$aout { run_dump_test "lifloat" }
    if $svr4pic { run_dump_test "lif-svr4pic" }
    if $svr4pic { run_dump_test "lif-xgot" }
    if $empic { run_dump_test "lif-empic" }
    run_dump_test "mips4"
    if !$ilocks { run_dump_test "mul" } else { run_dump_test "mul-ilocks" }
    run_dump_test "rol"
    if !$aout { run_dump_test "sb" }
    run_dump_test "trunc"
    if !$aout { run_dump_test "ulh" }
    if $svr4pic { run_dump_test "ulh-svr4pic" }
    if $svr4pic { run_dump_test "ulh-xgot" }
    if $empic { run_dump_test "ulh-empic" }
    if !$aout {
	run_dump_test "ulw"
	run_dump_test "uld"
	run_dump_test "ush"
	run_dump_test "usw"
	run_dump_test "usd"
    }
    # The mips16 test can only be run on ELF, because only ELF
    # supports the necessary mips16 reloc.
    if { $svr4pic && !$no_mips16 } { run_dump_test "mips16" }
    run_dump_test "delay"
    run_dump_test "nodelay"
    run_dump_test "mips4010"
    run_dump_test "mips4650"
    run_dump_test "mips4100"
    run_dump_test "lineno"
    run_dump_test "sync"

    # Make sure that -mcpu=FOO and -mFOO are equivalent.  Assemble a file
    # containing 4650-specific instructions with -m4650 and -mcpu=4650,
    # and verify that they're the same.  Specifically, we're checking
    # that the EF_MIPS_MACH field is set, and that the 4650 'mul'
    # instruction does get used.  In previous versions of GAS, 
    # only -mcpu=4650 would set the EF_MIPS_MACH field; -m4650 wouldn't.
    run_dump_test "elf_e_flags1"
    run_dump_test "elf_e_flags2"
    run_dump_test "elf_e_flags3"
    run_dump_test "elf_e_flags4"
}