Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # |
2 | # vtable tests | |
3 | # | |
4 | proc run_list_test { name opts } { | |
5 | global srcdir subdir | |
6 | set testname "vtable $name" | |
7 | set file $srcdir/$subdir/$name | |
8 | gas_run ${name}.s $opts ">&dump.out" | |
9 | if { [regexp_diff "dump.out" "${file}.l"] } then { | |
10 | fail $testname | |
11 | verbose "output is [file_contents "dump.out"]" 2 | |
12 | return | |
13 | } | |
14 | pass $testname | |
15 | } | |
16 | ||
deda5edf AM |
17 | # These tests are not (yet) supported on some targets. |
18 | proc vtable_setup_xfails { } { | |
19 | setup_xfail "alpha*-*" "arc-*" "avr-*" "d30v-*" | |
20 | setup_xfail "h8300*-*" "hppa*64*-*-*hpux*" | |
21 | setup_xfail "i370-*" "i860-*" "i960-*" "ia64-*" "ip2k-*" | |
22 | setup_xfail "mn10200-*" "or32-*" "sparc64*-*" | |
23 | } | |
24 | ||
252b5132 | 25 | # Vtable bits are only supported by ELF targets. |
846b8f1e | 26 | if { ( [istarget "*-*-elf*"] || [istarget "*-*-linux*"]) |
966d5bec | 27 | && ![istarget *-*-linux*aout*] |
8bda4946 | 28 | && ![istarget *-*-linux*ecoff*] |
966d5bec | 29 | && ![istarget *-*-linux*oldld*] } then { |
deda5edf AM |
30 | |
31 | vtable_setup_xfails | |
8bda4946 | 32 | run_dump_test "inherit0" |
0d2bcfaf | 33 | |
8bda4946 | 34 | # This particular test is supposed to fail.. |
252b5132 RH |
35 | run_list_test "inherit1" "-al" |
36 | ||
37 | # The vtable entry results are different on Rel and Rela targets. | |
deda5edf | 38 | vtable_setup_xfails |
8bda4946 AM |
39 | if {[istarget "arm*-*"] |
40 | || [istarget "arc-*"] | |
41 | || [istarget "d10v-*"] | |
42 | || [istarget "dlx-*"] | |
43 | || [istarget "i*86-*"] | |
21b99e26 AO |
44 | || ([istarget "mips*-*"] |
45 | && ! [istarget "mips64*-*-linux*"] | |
46 | && ! [istarget "mips*-*-irix6*"]) | |
8bda4946 AM |
47 | || [istarget "m68hc*-*"] |
48 | || [istarget "or32-*"] | |
49 | || [istarget "strongarm*-*"] | |
50 | || [istarget "xscale*-*"] } then { | |
252b5132 RH |
51 | |
52 | run_dump_test "entry0" | |
53 | ||
54 | } else { | |
55 | ||
56 | run_dump_test "entry1" | |
57 | ||
58 | } | |
59 | } |