diff options
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 81 |
1 files changed, 69 insertions, 12 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f2577c18106..f78b89b935f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -87,6 +87,12 @@ proc check_weak_available { } { return 1 } + # HP-UX 10.X doesn't support it + + if { [regexp "hppa.*hpux10" $target_triplet] } { + return 0 + } + # ELF and ECOFF support it. a.out does with gas/gld but may also with # other linkers, so we should try it @@ -97,19 +103,22 @@ proc check_weak_available { } { ecoff { return 1 } a.out { return 1 } mach-o { return 1 } + som { return 1 } unknown { return -1 } default { return 0 } } } +# APPLE LOCAL begin mainline 4.0 2005-03-25 ############################### -# proc check_visibility_available { } +# proc check_visibility_available { what_kind } ############################### # The visibility attribute is only support in some object formats # This proc returns 1 if it is supported, 0 if not. +# The argument is the kind of visibility, default/protected/hidden/internal. -proc check_visibility_available { } { +proc check_visibility_available { what_kind } { global visibility_available_saved global tool global target_triplet @@ -119,19 +128,31 @@ proc check_visibility_available { } { return 0 } - if {![info exists visibility_available_saved] } { - set lines [get_compiler_messages visibility object { - void f() __attribute__((visibility("hidden"))); - void f() {} - }] - if [string match "" $lines] then { - set visibility_available_saved 1 - } else { - set visibility_available_saved 0 + if [string match "" $what_kind] { set what_kind "hidden" } + + if { [info exists visibility_available_saved] } { + verbose "Saved result is <$visibility_available_saved>" 1 + if { [ lsearch -exact $visibility_available_saved $what_kind ] != -1 } { + return 1 + } elseif { [ lsearch -exact $visibility_available_saved "!$what_kind" ] != -1 } { + return 0 } } - return $visibility_available_saved + + set lines [get_compiler_messages visibility object " + void f() __attribute__((visibility(\"$what_kind\"))); + void f() {} + "] + if [string match "" $lines] then { + set answer 1 + lappend visibility_available_saved $what_kind + } else { + set answer 0 + lappend visibility_available_saved "!$what_kind" + } + return $answer } +# APPLE LOCAL end mainline 4.0 2005-03-25 ############################### # proc check_alias_available { } @@ -609,6 +630,22 @@ proc check_effective_target_vect_int { } { return $et_vect_int_saved } +# APPLE LOCAL begin mainline 2005-04-05 3972515 +# Return 1 if the target supports hardware vector shift operation. + +proc check_effective_target_vect_shift { } { + if { [istarget powerpc*-*-*] } { + set answer 1 + } else { + set answer 0 + } + + verbose "check_effective_target_vect_shift: returning $answer" 2 + return $answer +} + +# APPLE LOCAL end mainline 2005-04-05 3972515 + # Return 1 if the target supports hardware vectors of long, 0 otherwise. # # This can change for different subtargets so do not cache the result. @@ -734,6 +771,26 @@ proc check_effective_target_vect_no_align { } { return $et_vect_no_align_saved } +# APPLE LOCAL begin 3972875 mainline 2005-04-18 +# Return 1 if the target supports vector int multiplication, 0 otherwise. + +proc check_effective_target_vect_int_mult { } { + global et_vect_int_mult_saved + + if [info exists et_vect_int_mult] { + verbose "check_effective_target_vect_int_mult: using cached result" 2 + } else { + set et_vect_int_mult_saved 0 + if { [istarget powerpc*-*-*] } { + set et_vect_int_mult_saved 1 + } + } + + verbose "check_effective_target_vect_int_mult: returning $et_vect_int_mult_saved" 2 + return $et_vect_int_mult_saved +} +# APPLE LOCAL end 3972875 mainline 2005-04-18 + # Return 1 if the target matches the effective target 'arg', 0 otherwise. # This can be used with any check_* proc that takes no argument and # returns only 1 or 0. It could be used with check_* procs that take |