Commit e6474e22 by Christophe Lyon

testsuite: [arm/cde] Include arm_cde.h and arm_mve.h in arm_v8*m_main_cde*

Since arm_cde.h includes stdint.h, its use requires the presence of
the right gnu/stub-*.h, so make sure to include it when checking the
arm_v8*m_main_cde* effective targets, otherwise we can decide CDE is
supported while it's not really (all tests that use arm_v8m_main_cde*
also include arm_cde.h aynway).

Similarly for the effective targets that also require MVE.

This makes several tests unsupported rather than fail.

2020-04-22  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* lib/target-supports.exp (arm_v8m_main_cde, arm_v8m_main_cde_fp)
	(arm_v8_1m_main_cde_mve, arm_v8_1m_main_cde_mve_fp): Include
	arm_cde.h and arm_mve.h as ineeded.
parent 55ba33cc
2020-04-22 Christophe Lyon <christophe.lyon@linaro.org> 2020-04-22 Christophe Lyon <christophe.lyon@linaro.org>
gcc/testsuite/
* lib/target-supports.exp (arm_v8m_main_cde, arm_v8m_main_cde_fp)
(arm_v8_1m_main_cde_mve, arm_v8_1m_main_cde_mve_fp): Include
arm_cde.h and arm_mve.h as ineeded.
2020-04-22 Christophe Lyon <christophe.lyon@linaro.org>
* lib/target-supports.exp * lib/target-supports.exp
(check_effective_target_arm_v8_1m_mve_ok_nocache): Include (check_effective_target_arm_v8_1m_mve_ok_nocache): Include
arm_mve.h. arm_mve.h.
......
...@@ -5140,21 +5140,25 @@ proc add_options_for_arm_v8_2a_bf16_neon { flags } { ...@@ -5140,21 +5140,25 @@ proc add_options_for_arm_v8_2a_bf16_neon { flags } {
# /* { dg-add-options arm_v8m_main_cde } */ # /* { dg-add-options arm_v8m_main_cde } */
# The tests are valid for Arm. # The tests are valid for Arm.
foreach { armfunc armflag armdef } { foreach { armfunc armflag armdef arminc } {
arm_v8m_main_cde arm_v8m_main_cde
"-march=armv8-m.main+cdecp0+cdecp6 -mthumb" "-march=armv8-m.main+cdecp0+cdecp6 -mthumb"
"defined (__ARM_FEATURE_CDE)" "defined (__ARM_FEATURE_CDE)"
""
arm_v8m_main_cde_fp arm_v8m_main_cde_fp
"-march=armv8-m.main+fp+cdecp0+cdecp6 -mthumb -mfpu=auto" "-march=armv8-m.main+fp+cdecp0+cdecp6 -mthumb -mfpu=auto"
"defined (__ARM_FEATURE_CDE) && defined (__ARM_FP)" "defined (__ARM_FEATURE_CDE) && defined (__ARM_FP)"
""
arm_v8_1m_main_cde_mve arm_v8_1m_main_cde_mve
"-march=armv8.1-m.main+mve+cdecp0+cdecp6 -mthumb -mfpu=auto" "-march=armv8.1-m.main+mve+cdecp0+cdecp6 -mthumb -mfpu=auto"
"defined (__ARM_FEATURE_CDE) && defined (__ARM_FEATURE_MVE)" "defined (__ARM_FEATURE_CDE) && defined (__ARM_FEATURE_MVE)"
"#include <arm_mve.h>"
arm_v8_1m_main_cde_mve_fp arm_v8_1m_main_cde_mve_fp
"-march=armv8.1-m.main+mve.fp+cdecp0+cdecp6 -mthumb -mfpu=auto" "-march=armv8.1-m.main+mve.fp+cdecp0+cdecp6 -mthumb -mfpu=auto"
"defined (__ARM_FEATURE_CDE) || __ARM_FEATURE_MVE == 3" "defined (__ARM_FEATURE_CDE) || __ARM_FEATURE_MVE == 3"
"#include <arm_mve.h>"
} { } {
eval [string map [list FUNC $armfunc FLAG $armflag DEF $armdef ] { eval [string map [list FUNC $armfunc FLAG $armflag DEF $armdef INC $arminc ] {
proc check_effective_target_FUNC_ok_nocache { } { proc check_effective_target_FUNC_ok_nocache { } {
global et_FUNC_flags global et_FUNC_flags
set et_FUNC_flags "" set et_FUNC_flags ""
...@@ -5167,6 +5171,8 @@ foreach { armfunc armflag armdef } { ...@@ -5167,6 +5171,8 @@ foreach { armfunc armflag armdef } {
#if !(DEF) #if !(DEF)
#error "DEF failed" #error "DEF failed"
#endif #endif
#include <arm_cde.h>
INC
} "FLAG"] } { } "FLAG"] } {
set et_FUNC_flags "FLAG" set et_FUNC_flags "FLAG"
return 1 return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment