diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2016-03-23 10:32:54 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2016-03-23 10:32:54 +0000 |
commit | a59f0bef3e6594db58a4f4b9329ca1ebc7b4da75 (patch) | |
tree | 83ddff6ed21a7d83472f94a9b721cd2d30afdca8 /gcc | |
parent | 6b32fd17a601a76ee5d34ec86f77e87a54e88632 (diff) | |
download | gcc-a59f0bef3e6594db58a4f4b9329ca1ebc7b4da75.zip gcc-a59f0bef3e6594db58a4f4b9329ca1ebc7b4da75.tar.gz gcc-a59f0bef3e6594db58a4f4b9329ca1ebc7b4da75.tar.bz2 |
[ARM] Split out armv7ve effective target check
* lib/target-supports.exp: Remove v7ve entry from loop
creating effective target checks.
(check_effective_target_arm_arch_v7ve_ok): New procedure.
(add_options_for_arm_arch_v7ve): Likewise.
From-SVN: r234420
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 25 |
2 files changed, 30 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f9c6de25..d072548 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * lib/target-supports.exp: Remove v7ve entry from loop + creating effective target checks. + (check_effective_target_arm_arch_v7ve_ok): New procedure. + (add_options_for_arm_arch_v7ve): Likewise. + 2016-03-23 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/70354 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 49b82c3..777bff8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3171,7 +3171,9 @@ proc check_effective_target_arm_fp16_ok { } { # Creates a series of routines that return 1 if the given architecture # can be selected and a routine to give the flags to select that architecture # Note: Extra flags may be added to disable options from newer compilers -# (Thumb in particular - but others may be added in the future) +# (Thumb in particular - but others may be added in the future). +# -march=armv7ve is special and is handled explicitly after this loop because +# it needs more than one predefine check to identify. # Usage: /* { dg-require-effective-target arm_arch_v5_ok } */ # /* { dg-add-options arm_arch_v5 } */ # /* { dg-require-effective-target arm_arch_v5_multilib } */ @@ -3186,7 +3188,6 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ v6z "-march=armv6z" __ARM_ARCH_6Z__ v6m "-march=armv6-m -mthumb" __ARM_ARCH_6M__ v7a "-march=armv7-a" __ARM_ARCH_7A__ - v7ve "-march=armv7ve" __ARM_ARCH_7A__ v7r "-march=armv7-r" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__ v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__ @@ -3221,6 +3222,26 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ }] } +# Same functions as above but for -march=armv7ve. To uniquely identify +# -march=armv7ve we need to check for __ARM_ARCH_7A__ as well as +# __ARM_FEATURE_IDIV otherwise it aliases with armv7-a. + +proc check_effective_target_arm_arch_v7ve_ok { } { + if { [ string match "*-marm*" "-march=armv7ve" ] && + ![check_effective_target_arm_arm_ok] } { + return 0 + } + return [check_no_compiler_messages arm_arch_v7ve_ok assembly { + #if !defined (__ARM_ARCH_7A__) || !defined (__ARM_FEATURE_IDIV) + #error !armv7ve + #endif + } "-march=armv7ve" ] +} + +proc add_options_for_arm_arch_v7ve { flags } { + return "$flags -march=armv7ve" +} + # Return 1 if this is an ARM target where -marm causes ARM to be # used (not Thumb) |