]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: testsuite: tidy up pre-run check for g2.c
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 3 Nov 2023 17:30:35 +0000 (17:30 +0000)
committerRichard Earnshaw <rearnsha@arm.com>
Mon, 13 Nov 2023 14:15:55 +0000 (14:15 +0000)
gcc.target/arm/g2.c is an xscale-only test, but the test is quite old
and we have improved the infrastructure for setting up such tests now.
So make use of that to reduce the number of cases where this test fails
to run.

gcc/testsuite:

* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
Add entry to check for xscale.
* gcc.target/arm/g2.c: Use it.

gcc/testsuite/gcc.target/arm/g2.c
gcc/testsuite/lib/target-supports.exp

index ca5e3ccff662c643a0fdb3302d2fc268fb88a917..04334c97713bf8f8f7d7fc4d05560d734133ba97 100644 (file)
@@ -1,11 +1,9 @@
 /* Verify that hardware multiply is preferred on XScale. */
 /* { dg-do compile } */
-/* { dg-options "-mcpu=xscale -O2 -marm" } */
-/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
-/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
-/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
-/* { dg-require-effective-target arm_arch_v5te_arm_ok } */
-/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm_arch_xscale_arm_ok } */
+/* { dg-add-options arm_arch_xscale_arm } */
+
 
 /* Brett Gaines' test case. */
 unsigned BCPL(unsigned) __attribute__ ((naked));
index 7d83bd8740f351576314cd86343c975e06e060b6..9d2958626ad4dc4dd50d47a530b9dc1f64c69f5d 100644 (file)
@@ -5411,6 +5411,7 @@ foreach { armfunc armflag armdefs } {
        v5te "-march=armv5te+fp -mfloat-abi=softfp" __ARM_ARCH_5TE__
        v5te_arm "-march=armv5te+fp -marm" __ARM_ARCH_5TE__
        v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__
+       xscale_arm "-mcpu=xscale -mfloat-abi=soft -marm" __XSCALE__
        v6 "-march=armv6+fp -mfloat-abi=softfp" __ARM_ARCH_6__
        v6_arm "-march=armv6+fp -marm" __ARM_ARCH_6__
        v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__