Commit | Line | Data |
---|---|---|
3251495b | 1 | if { ![is_elf_format] && ![is_pecoff_format] } then { |
d04428bd AM |
2 | return |
3 | } | |
fa87b337 | 4 | |
b6460688 L |
5 | proc gas_x86_64_check { } { |
6 | global NM | |
7 | global NMFLAGS | |
2ebaa23b | 8 | |
b6460688 L |
9 | set status [gas_host_run "$NM $NMFLAGS --help" ""] |
10 | return [regexp "targets:.*x86-64" [lindex $status 1]]; | |
11 | } | |
12 | ||
13 | proc gas_x86_32_check { } { | |
14 | global NM | |
15 | global NMFLAGS | |
16 | ||
17 | set status [gas_host_run "$NM $NMFLAGS --help" ""] | |
18 | return [regexp "targets:.*i386" [lindex $status 1]]; | |
19 | } | |
20 | ||
21 | if { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then { | |
22 | ||
23 | global ASFLAGS | |
24 | set old_ASFLAGS "$ASFLAGS" | |
25 | ||
26 | if { [gas_x86_64_check] } then { | |
27 | set ASFLAGS "$ASFLAGS --64" | |
28 | run_dump_test "cfi-x86_64" | |
29 | set ASFLAGS "$old_ASFLAGS" | |
30 | } | |
31 | ||
32 | if { [gas_x86_32_check] } then { | |
33 | set ASFLAGS "$ASFLAGS --32" | |
34 | run_dump_test "cfi-i386" | |
35 | set ASFLAGS "$old_ASFLAGS" | |
36 | } | |
f37f01cf | 37 | |
3251495b RH |
38 | if { [is_pecoff_format] } then { |
39 | run_dump_test "reloc-pe-i386" | |
40 | } | |
41 | ||
d04428bd AM |
42 | } elseif { [istarget alpha*-*-*] } then { |
43 | run_dump_test "cfi-alpha-1" | |
44 | run_dump_test "cfi-alpha-2" | |
45 | run_dump_test "cfi-alpha-3" | |
f37f01cf | 46 | |
ab1f5dd1 | 47 | } elseif { [istarget powerpc*-*-*] } then { |
75e21f08 JJ |
48 | run_dump_test "cfi-ppc-1" |
49 | ||
50 | } elseif { [istarget s390*-*-*] } then { | |
51 | run_dump_test "cfi-s390-1" | |
52 | if { [istarget s390x*-*-*] } then { | |
53 | run_dump_test "cfi-s390x-1" | |
54 | } | |
55 | ||
c04898f8 AS |
56 | } elseif { [istarget "m68*-*"] } then { |
57 | run_dump_test "cfi-m68k" | |
58 | ||
364b6d8b JJ |
59 | } elseif { [istarget sparc*-*-*] } then { |
60 | global NM | |
61 | global NMFLAGS | |
364b6d8b | 62 | |
7f6a71ff | 63 | set nm_status [gas_host_run "$NM $NMFLAGS --help" ""] |
364b6d8b | 64 | run_dump_test "cfi-sparc-1" |
7f6a71ff | 65 | if { [regexp "elf64\[_-\]sparc" [lindex $nm_status 1]] } then { |
364b6d8b JJ |
66 | run_dump_test "cfi-sparc64-1" |
67 | } | |
2ce4cc60 KK |
68 | |
69 | } elseif [istarget "sh*-*"] then { | |
70 | if { [istarget sh64*-*-*] || [istarget sh5*-*-*] } then { | |
71 | } else { | |
72 | run_dump_test "cfi-sh-1" | |
73 | } | |
74 | ||
8c5fc800 | 75 | } elseif { [istarget "arm*-*"] } then { |
87c119b0 NC |
76 | # Only ELF based ARM targets support CFI. |
77 | if { [is_pecoff_format] } then { | |
78 | return | |
79 | } | |
a394c00f NC |
80 | run_dump_test "cfi-arm-1" |
81 | ||
5862107c EC |
82 | } elseif { [istarget "mips*-*"] } then { |
83 | run_dump_test "cfi-mips-1" | |
406601a1 RC |
84 | } elseif { [istarget "hppa*-linux*"] } then { |
85 | run_dump_test "cfi-hppa-1" | |
d04428bd AM |
86 | } else { |
87 | return | |
f37f01cf | 88 | } |
fa87b337 | 89 | |
d04428bd | 90 | run_list_test "cfi-diag-1" "" |
f3a503f6 | 91 | |
aa8d5e45 RH |
92 | # HPPA64 uses 64-bit relocations, which results in all of the dump |
93 | # offset numbers not matching up. | |
94 | if { ![istarget "hppa64*-*"] } then { | |
95 | run_dump_test "cfi-common-1" | |
96 | run_dump_test "cfi-common-2" | |
97 | run_dump_test "cfi-common-3" | |
98 | run_dump_test "cfi-common-4" | |
3251495b RH |
99 | if { ![is_pecoff_format] } then { |
100 | # This test uses .subsection/.previous which are elf-specific. | |
101 | run_dump_test "cfi-common-5" | |
102 | } | |
ab1f5dd1 AM |
103 | # Some targets don't support PC relative cfi directives |
104 | if { ![istarget "mips*-*"] && | |
105 | !([istarget powerpc*-*-*] && [is_pecoff_format]) } then { | |
f3a503f6 | 106 | run_dump_test "cfi-common-6" |
40a41a9a DA |
107 | } |
108 | run_dump_test "cfi-common-7" | |
f3a503f6 | 109 | } |