]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: testsuite: adjust ftest tests
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 25 Mar 2025 15:36:02 +0000 (15:36 +0000)
committerRichard Earnshaw <rearnsha@arm.com>
Tue, 25 Mar 2025 16:10:39 +0000 (16:10 +0000)
The ftest-*.c tests for Arm check certain ACLE mandated macros to ensure
they are correctly defined based on the selected architecture.  ACLE
states that the macro should be defined if the operation exists in
the hardware, but it doesn't have to exist in the current ISA because
and interworking call to the library function will still result in using
the hardware operation (both GCC and Clang agree on this).  So adjust
the tests accordingly.

Whilst cleaning this up, also remove the now redundant dg-skip-if operations
that were testing for incompatible command-line options.  That should now
be a thing of the past as the framework will clean this up more thoroughly
before running the test, or detect incompatible option combinations.

gcc/testsuite/ChangeLog:

* gcc.target/arm/ftest-armv4t-thumb.c:  Expect __ARM_FEATURE_CLZ to be
defined.  Remove redundant dg-skip-if rules.
* gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
* gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
* gcc.target/arm/ftest-armv6-thumb.c: Likewise.
* gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
* gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
* gcc.target/arm/ftest-armv7em-thumb.c: Remove redundant dg-skip-if
rules.  Add a require-effective-target for armv7em.
* gcc.target/arm/ftest-armv7a-arm.c: Likewise.
* gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
* gcc.target/arm/ftest-armv7r-arm.c: Likewise.
* gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
* gcc.target/arm/ftest-armv7ve-arm.c: Likewise.
* gcc.target/arm/ftest-armv7ve-thumb.c: Likewise.
* gcc.target/arm/ftest-armv8a-arm.c: Likewise.
* gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
* gcc.target/arm/ftest-armv4-arm.c: Remove redundant dg-skip-if rules.
* gcc.target/arm/ftest-armv4t-arm.c: Likewise.
* gcc.target/arm/ftest-armv5t-arm.c: Likewise.
* gcc.target/arm/ftest-armv5te-arm.c: Likewise.
* gcc.target/arm/ftest-armv6-arm.c: Likewise.
* gcc.target/arm/ftest-armv6k-arm.c: Likewise.
* gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
* gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
* gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
* gcc.target/arm/ftest-armv6z-arm.c: Likewise.

25 files changed:
gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv7em-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c
gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c
gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c

index 447a8ec16ae684a08b3c1370063b3ebeb755deec..63d57d41d3f592ac1b7a28f96d3a4a1d52b4f2db 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v4_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4 } */
index 28fd2f79ddb79580c9d97418dfb51c4ef32ffa42..d33beef1d730c5596a3fc4262add6a2a12000ca5 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v4t_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4t } */
index 78878f7d6ec2a539885c263717a64eda54b64b4e..8f438015a9e28df2207a2418c3b444e8e317ae3c 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v4t_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v4t } */
index 81912992037bd60c564b5f185600e89bec0fd4bc..cc139f1e892ba8a2886e28942d29fd393fdb0aa7 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v5t_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5t } */
index b25d17db159367aa2a1f24280528c0b5be4aa447..1432018cfbb52257c04de827c9a90668eda4eb88 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v5t_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5t } */
@@ -14,4 +12,9 @@
 #define NEED_ARM_ARCH_ISA_THUMB
 #define VALUE_ARM_ARCH_ISA_THUMB 1
 
+/* Not in the Thumb ISA, but does exist in Arm state.  A call to the library
+   function should result in using that instruction in Arm state.  */
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
 #include "ftest-support.h"
index e0c0d5cf8d92e1121612e9e322820c6b52ecb048..2917ee6ea4de21bca6464b684565c2f62a3916bc 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v5te_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5te } */
index 27a64a2227b207679d3c07f09109047716e43af5..768dbaa9ad4181f50fe6537095c215fbbc6948e0 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v5te_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5te } */
@@ -14,4 +12,9 @@
 #define NEED_ARM_ARCH_ISA_THUMB
 #define VALUE_ARM_ARCH_ISA_THUMB 1
 
+/* Not in the Thumb ISA, but does exist in Arm state.  A call to the library
+   function should result in using that instruction in Arm state.  */
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
 #include "ftest-support.h"
index 5d447c3c18f9c7b5a3d0ba5c801e99fd3668b655..648acb1ba948b1672cfe2282684ff7ee11345577 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6 } */
index 15a6d75ccd26bdcb25f56ac1a81268954f7ee705..02360eea2c8bdd30b263b1c28bb48f9a6dbd9dbe 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6 } */
@@ -14,4 +12,9 @@
 #define NEED_ARM_ARCH_ISA_THUMB
 #define VALUE_ARM_ARCH_ISA_THUMB 1
 
+/* Not in the Thumb ISA, but does exist in Arm state.  A call to the library
+   function should result in using that instruction in Arm state.  */
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
 #include "ftest-support.h"
index 0656e8f254989837d946b6e3d3179eafb06295bb..ccc4e036825d3cf6d2a3d0072b1f8b0222efba54 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6k_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6k } */
index b3b6ecf1b195209df79d45e3f121eee40fa5b5f8..2c5490f64934e10f116dc0a000e41f99cf2e523f 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6k_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6k } */
@@ -14,4 +12,9 @@
 #define NEED_ARM_ARCH_ISA_THUMB
 #define VALUE_ARM_ARCH_ISA_THUMB 1
 
+/* Not in the Thumb ISA, but does exist in Arm state.  A call to the library
+   function should result in using that instruction in Arm state.  */
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
 #include "ftest-support.h"
index 27f71be8d8a5f53af746093be8b7a81895d2cc6d..46cf9578ffd6f7a7ccd6e0d6124c92736a46a675 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6m_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6m } */
index 259d2b50df268770f0b21213733ccd95f686bcdc..d24b08c579182413071d7d9381a167caf29029c7 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6t2_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6t2 } */
index e624ec549c1eaac573a88ecb8f873a413466fb42..27d2ccbad7ca23c336ceca8cafed3c60a3b7e07f 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6t2_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6t2 } */
index 6e3a9664be762e1c4030c512d1143a68848b1498..7de37ee7c4bb753c037e7dc4fb5d22ca0bf05280 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6z_arm_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6z } */
index 23a4fcd7da2e438ae1118133a54c41f9caf6e916..d3e0393b2cd2319a83f7ae957a6bc266d536d05f 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-require-effective-target arm_arch_v6z_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6z } */
@@ -14,4 +12,9 @@
 #define NEED_ARM_ARCH_ISA_THUMB
 #define VALUE_ARM_ARCH_ISA_THUMB 1
 
+/* Not in the Thumb ISA, but does exist in Arm state.  A call to the library
+   function should result in using that instruction in Arm state.  */
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
 #include "ftest-support.h"
index 43f52fe8cbc0c1b3900edc5bce028baa8f3ed586..ec70bc5fb4e19ef67f176422706e5ba71e503698 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7a_ok }
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7a } */
 
index 717f44c36c85ffdc10b88deb19947647057976c6..d0ae7861835304ae819f1db4dcd35f8048c7bc54 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7a_ok }
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7a } */
 
index 688d766e71d2a732fe1ac8a68cb8c0732959bece..353dbadc94697879a0f70461230f018e6ad62ff5 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7e-m" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v7em_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7em } */
 
index 24b93ea9a56f1c9f6d90191275570cafebb48611..28090500994a6850d25d4ca22df89a2584094628 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7r_ok }
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7r } */
 
index a7c3772891127956d2ceb9be03b7c8ee1525249d..7ee7981532cc7914af62a05dd04af36b54dcd40e 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7r_ok }
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7r } */
 
index 72c4c1f85f5f70026d23dc56a4b4019f7d6de383..e6e6862349a24c629e2a1e74b7255d69d583c748 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7ve_ok }
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7ve } */
 
index 772405b28cb2574e9445915b09b6fd5d51c1d5f3..5a2ffd888b0462050e5ff55eb41fb5ddd51e47f8 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v7ve_ok }
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7ve } */
 
index feab5eec66532de1c9170c75f68969ac435a00b4..40d2437144b6f7b2dd1ac9c47dab798f618f6edb 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v8a_ok }
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v8a } */
 
index 28d54bfaf27218afd9b655af06b3b6669214d1e8..9f130691b0237154cae560911f6398f863095eab 100644 (file)
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
-/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-require-effective-target arm_arch_v8a_ok }
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v8a } */