mirror of git://gcc.gnu.org/git/gcc.git
[ARM] Allow arm_arch_*_ok to test several macros
2017-06-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
Test for null definitions instead of them being undefined. Add entry
for ARMv7VE. Reindent entry for ARMv8-M Baseline. Add comment warning
about using the effective target for architecture extension.
(check_effective_target_arm_arch_v7ve_ok): Remove.
(add_options_for_arm_arch_v7ve): Likewise.
From-SVN: r249059
This commit is contained in:
parent
4f751c5437
commit
051508d769
|
|
@ -1,3 +1,12 @@
|
||||||
|
2017-06-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||||
|
|
||||||
|
* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
|
||||||
|
Test for null definitions instead of them being undefined. Add entry
|
||||||
|
for ARMv7VE. Reindent entry for ARMv8-M Baseline. Add comment warning
|
||||||
|
about using the effective target for architecture extension.
|
||||||
|
(check_effective_target_arm_arch_v7ve_ok): Remove.
|
||||||
|
(add_options_for_arm_arch_v7ve): Likewise.
|
||||||
|
|
||||||
2017-06-09 Richard Biener <rguenther@suse.de>
|
2017-06-09 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/66623
|
PR tree-optimization/66623
|
||||||
|
|
|
||||||
|
|
@ -3772,12 +3772,13 @@ proc check_effective_target_arm_fp16_hw { } {
|
||||||
# can be selected and a routine to give the flags to select that 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
|
# 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
|
# Warning: Do not use check_effective_target_arm_arch_*_ok for architecture
|
||||||
# it needs more than one predefine check to identify.
|
# extension (eg. ARMv8.1-A) since there is no macro defined for them. See
|
||||||
|
# how only __ARM_ARCH_8A__ is checked for ARMv8.1-A.
|
||||||
# Usage: /* { dg-require-effective-target arm_arch_v5_ok } */
|
# Usage: /* { dg-require-effective-target arm_arch_v5_ok } */
|
||||||
# /* { dg-add-options arm_arch_v5 } */
|
# /* { dg-add-options arm_arch_v5 } */
|
||||||
# /* { dg-require-effective-target arm_arch_v5_multilib } */
|
# /* { dg-require-effective-target arm_arch_v5_multilib } */
|
||||||
foreach { armfunc armflag armdef } {
|
foreach { armfunc armflag armdefs } {
|
||||||
v4 "-march=armv4 -marm" __ARM_ARCH_4__
|
v4 "-march=armv4 -marm" __ARM_ARCH_4__
|
||||||
v4t "-march=armv4t" __ARM_ARCH_4T__
|
v4t "-march=armv4t" __ARM_ARCH_4T__
|
||||||
v5 "-march=armv5 -marm" __ARM_ARCH_5__
|
v5 "-march=armv5 -marm" __ARM_ARCH_5__
|
||||||
|
|
@ -3792,20 +3793,23 @@ foreach { armfunc armflag armdef } {
|
||||||
v7r "-march=armv7-r" __ARM_ARCH_7R__
|
v7r "-march=armv7-r" __ARM_ARCH_7R__
|
||||||
v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__
|
v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__
|
||||||
v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__
|
v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__
|
||||||
|
v7ve "-march=armv7ve -marm"
|
||||||
|
"__ARM_ARCH_7A__ && __ARM_FEATURE_IDIV"
|
||||||
v8a "-march=armv8-a" __ARM_ARCH_8A__
|
v8a "-march=armv8-a" __ARM_ARCH_8A__
|
||||||
v8_1a "-march=armv8.1a" __ARM_ARCH_8A__
|
v8_1a "-march=armv8.1a" __ARM_ARCH_8A__
|
||||||
v8_2a "-march=armv8.2a" __ARM_ARCH_8A__
|
v8_2a "-march=armv8.2a" __ARM_ARCH_8A__
|
||||||
v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft" __ARM_ARCH_8M_BASE__
|
v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft"
|
||||||
|
__ARM_ARCH_8M_BASE__
|
||||||
v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__ } {
|
v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__ } {
|
||||||
eval [string map [list FUNC $armfunc FLAG $armflag DEF $armdef ] {
|
eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
|
||||||
proc check_effective_target_arm_arch_FUNC_ok { } {
|
proc check_effective_target_arm_arch_FUNC_ok { } {
|
||||||
if { [ string match "*-marm*" "FLAG" ] &&
|
if { [ string match "*-marm*" "FLAG" ] &&
|
||||||
![check_effective_target_arm_arm_ok] } {
|
![check_effective_target_arm_arm_ok] } {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
|
return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
|
||||||
#if !defined (DEF)
|
#if !(DEFS)
|
||||||
#error !DEF
|
#error !(DEFS)
|
||||||
#endif
|
#endif
|
||||||
} "FLAG" ]
|
} "FLAG" ]
|
||||||
}
|
}
|
||||||
|
|
@ -3826,26 +3830,6 @@ foreach { armfunc armflag armdef } {
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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 GCC was configured with --with-mode=
|
# Return 1 if GCC was configured with --with-mode=
|
||||||
proc check_effective_target_default_mode { } {
|
proc check_effective_target_default_mode { } {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue