diff options
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index bc5baa76622..f597316ac4d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -984,6 +984,14 @@ proc check_named_sections_available { } { }] } +# Return true if the "naked" function attribute is supported on this target. + +proc check_effective_target_naked_functions { } { + return [check_no_compiler_messages naked_functions assembly { + void f() __attribute__((naked)); + }] +} + # Return 1 if the target supports Fortran real kinds larger than real(8), # 0 otherwise. # @@ -1681,6 +1689,15 @@ proc check_effective_target_llp64 { } { }] } +# Return 1 if long and int have different sizes, +# 0 otherwise. + +proc check_effective_target_long_neq_int { } { + return [check_no_compiler_messages long_ne_int object { + int dummy[sizeof (int) != sizeof (long) ? 1 : -1]; + }] +} + # Return 1 if the target supports long double larger than double, # 0 otherwise. @@ -2341,6 +2358,19 @@ proc check_effective_target_arm_eabi { } { }] } +# Return 1 if this is an ARM target that adheres to the hard-float variant of +# the ABI for the ARM Architecture (e.g. -mfloat-abi=hard). + +proc check_effective_target_arm_hf_eabi { } { + return [check_no_compiler_messages arm_hf_eabi object { + #if !defined(__ARM_EABI__) || !defined(__ARM_PCS_VFP) + #error not hard-float EABI + #else + int dummy; + #endif + }] +} + # Return 1 if this is an ARM target supporting -mcpu=iwmmxt. # Some multilibs may be incompatible with this option. @@ -3366,6 +3396,26 @@ proc check_effective_target_natural_alignment_64 { } { return $et_natural_alignment_64_saved } +# Return 1 if all vector types are naturally aligned (aligned to their +# type-size), 0 otherwise. +# +# This won't change for different subtargets so cache the result. + +proc check_effective_target_vect_natural_alignment { } { + global et_vect_natural_alignment + + if [info exists et_vect_natural_alignment_saved] { + verbose "check_effective_target_vect_natural_alignment: using cached result" 2 + } else { + set et_vect_natural_alignment_saved 1 + if { [check_effective_target_arm_eabi] } { + set et_vect_natural_alignment_saved 0 + } + } + verbose "check_effective_target_vect_natural_alignment: returning $et_vect_natural_alignment_saved" 2 + return $et_vect_natural_alignment_saved +} + # Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise. # # This won't change for different subtargets so cache the result. @@ -3844,6 +3894,7 @@ proc check_effective_target_sync_int_long { } { || [istarget hppa*-*linux*] || [istarget s390*-*-*] || [istarget powerpc*-*-*] + || [istarget crisv32-*-*] || [istarget cris-*-*] || ([istarget sparc*-*-*] && [check_effective_target_sparc_v9]) || [check_effective_target_mips_llsc] } { set et_sync_int_long_saved 1 @@ -3873,6 +3924,7 @@ proc check_effective_target_sync_char_short { } { || [istarget hppa*-*linux*] || [istarget s390*-*-*] || [istarget powerpc*-*-*] + || [istarget crisv32-*-*] || [istarget cris-*-*] || ([istarget sparc*-*-*] && [check_effective_target_sparc_v9]) || [check_effective_target_mips_llsc] } { set et_sync_char_short_saved 1 |