]> git.ipfire.org Git - people/ms/gcc.git/commit - gcc/doc/sourcebuild.texi
testsuite/arm: Add arm_dsp_ok effective target and use it in arm/acle/dsp_arith.c
authorChristophe Lyon <christophe.lyon@linaro.org>
Tue, 21 Apr 2020 07:31:59 +0000 (07:31 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 23 Mar 2021 15:11:52 +0000 (15:11 +0000)
commit3c3c0042736846c469cddd70d56eca7239dbad01
treef196ab1c1d052e4bb658319c9aa2181a9038d57a
parent165bc67beb45f0f7e0d4f41347dab1649436f08a
testsuite/arm: Add arm_dsp_ok effective target and use it in arm/acle/dsp_arith.c

gcc.target/arm/acle/dsp_arith.c uses DSP intrinsics, which arm_acle.h
defines only with __ARM_FEATURE_DSP, so make the test check for that
property rather than arm_qbit_ok.

However, the existing arm_dsp effective target only checks if DSP
features are supported with the current multilib rather than trying
-march and -mfloat-abi options. Thus we introduce a similar effective
target, arm_dsp_ok and associated dg-add-options.

This makes dsp_arith.c unsupported rather than failed when no option
combination is suitable, for instance when running the tests with
-mcpu=cortex-m3.

2021-03-19  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* doc/sourcebuild.texi (arm_dsp_ok, arm_dsp): Document.

gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_arm_dsp_ok_nocache)
(check_effective_target_arm_dsp_ok, add_options_for_arm_dsp): New.
* gcc.target/arm/acle/dsp_arith.c: Use arm_dsp_ok effective target
and add arm_dsp options.
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.target/arm/acle/dsp_arith.c
gcc/testsuite/lib/target-supports.exp