[testsuite/ARM] Fix coprocessor intrinsic test failures on ARMv8-A
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 13 Sep 2017 10:27:00 +0000 (10:27 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Wed, 13 Sep 2017 10:27:00 +0000 (10:27 +0000)
commit4395a4738963e1bfc2202a2433c6d1d24a28e017
tree76d2904a464304639359afb27c9332d5ed660d93
parentc29730ec17675f70785f6326c35a2be59eaba53b
[testsuite/ARM] Fix coprocessor intrinsic test failures on ARMv8-A

Coprocessor intrinsic tests in gcc.target/arm/acle test whether
__ARM_FEATURE_COPROC has the right bit defined before calling the
intrinsic. This allows to test both the correct setting of that macro
and the availability and correct working of the intrinsic. However the
__ARM_FEATURE_COPROC macro is no longer defined for ARMv8-A since
r249399.

This patch changes the testcases to skip that test for ARMv8-A and
ARMv8-R targets.  It also fixes some irregularity in the coprocessor
effective targets:
- add ldcl and stcl to the list of instructions listed as guarded by
  arm_coproc1_ok
- enable tests guarded by arm_coproc2_ok, arm_coproc3_ok and
  arm_coproc4_ok for Thumb-2 capable targets but disable for Thumb-1
  targets.

2017-09-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    * gcc.target/arm/acle/cdp.c: Skip __ARM_FEATURE_COPROC check for
    ARMv8-A and ARMv8-R.
    * gcc.target/arm/acle/cdp2.c: Likewise.
    * gcc.target/arm/acle/ldc.c: Likewise.
    * gcc.target/arm/acle/ldc2.c: Likewise.
    * gcc.target/arm/acle/ldc2l.c: Likewise.
    * gcc.target/arm/acle/ldcl.c: Likewise.
    * gcc.target/arm/acle/mcr.c: Likewise.
    * gcc.target/arm/acle/mcr2.c: Likewise.
    * gcc.target/arm/acle/mcrr.c: Likewise.
    * gcc.target/arm/acle/mcrr2.c: Likewise.
    * gcc.target/arm/acle/mrc.c: Likewise.
    * gcc.target/arm/acle/mrc2.c: Likewise.
    * gcc.target/arm/acle/mrrc.c: Likewise.
    * gcc.target/arm/acle/mrrc2.c: Likewise.
    * gcc.target/arm/acle/stc.c: Likewise.
    * gcc.target/arm/acle/stc2.c: Likewise.
    * gcc.target/arm/acle/stc2l.c: Likewise.
    * gcc.target/arm/acle/stcl.c: Likewise.
    * lib/target-supports.exp:
    (check_effective_target_arm_coproc1_ok_nocache): Mention ldcl
    and stcl in the comment.
    (check_effective_target_arm_coproc2_ok_nocache): Allow Thumb-2 targets
    and disable Thumb-1 targets.
    (check_effective_target_arm_coproc3_ok_nocache): Likewise.
    (check_effective_target_arm_coproc4_ok_nocache): Likewise.

Acked-by: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
From-SVN: r252074
20 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/acle/cdp.c
gcc/testsuite/gcc.target/arm/acle/cdp2.c
gcc/testsuite/gcc.target/arm/acle/ldc.c
gcc/testsuite/gcc.target/arm/acle/ldc2.c
gcc/testsuite/gcc.target/arm/acle/ldc2l.c
gcc/testsuite/gcc.target/arm/acle/ldcl.c
gcc/testsuite/gcc.target/arm/acle/mcr.c
gcc/testsuite/gcc.target/arm/acle/mcr2.c
gcc/testsuite/gcc.target/arm/acle/mcrr.c
gcc/testsuite/gcc.target/arm/acle/mcrr2.c
gcc/testsuite/gcc.target/arm/acle/mrc.c
gcc/testsuite/gcc.target/arm/acle/mrc2.c
gcc/testsuite/gcc.target/arm/acle/mrrc.c
gcc/testsuite/gcc.target/arm/acle/mrrc2.c
gcc/testsuite/gcc.target/arm/acle/stc.c
gcc/testsuite/gcc.target/arm/acle/stc2.c
gcc/testsuite/gcc.target/arm/acle/stc2l.c
gcc/testsuite/gcc.target/arm/acle/stcl.c
gcc/testsuite/lib/target-supports.exp