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 | ||
17 | # Vtable bits are only supported by ELF targets. | |
846b8f1e | 18 | if { ( [istarget "*-*-elf*"] || [istarget "*-*-linux*"]) |
966d5bec ILT |
19 | && ![istarget *-*-linux*aout*] |
20 | && ![istarget *-*-linux*oldld*] } then { | |
846b8f1e NC |
21 | |
22 | # These tests are not (yet) supported on some targets. | |
23 | if { [istarget "ia64-*"] | |
24 | || [istarget "hppa*64*-*-*"] | |
25 | || [istarget "i960-*-*"] | |
26 | || [istarget "arc*-*-*"] | |
183d6175 | 27 | || [istarget "alpha*-*-*"] |
846b8f1e NC |
28 | || [istarget "d30v-*-*"] } then { |
29 | return | |
eaf99ab9 NC |
30 | } |
31 | ||
0d2bcfaf NC |
32 | # not yet supported by ARC |
33 | if {[istarget "arc*-*-*"]} { | |
34 | return | |
35 | } | |
36 | ||
252b5132 RH |
37 | run_dump_test "inherit0" |
38 | run_list_test "inherit1" "-al" | |
39 | ||
40 | # The vtable entry results are different on Rel and Rela targets. | |
f3d180e9 | 41 | if {[istarget "i*86-*-*"] |
846b8f1e | 42 | || [istarget "d10v-*-*"] |
f3d180e9 | 43 | || [istarget "mips*-*-*"] |
c5089c84 | 44 | || [istarget "strongarm*-*-*"] |
eaf99ab9 | 45 | || [istarget "xscale*-*-*"] |
846b8f1e | 46 | || [istarget "arm*-*-*"] } then { |
252b5132 RH |
47 | |
48 | run_dump_test "entry0" | |
49 | ||
50 | } else { | |
51 | ||
52 | run_dump_test "entry1" | |
53 | ||
54 | } | |
55 | } |