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 | 10 ++++------ gcc/testsuite/lib/target-supports.exp | 1 + 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/gcc/testsuite/gcc.target/arm/g2.c b/gcc/testsuite/gcc.target/arm/g2.c index ca5e3ccff66..04334c97713 100644 --- a/gcc/testsuite/gcc.target/arm/g2.c +++ b/gcc/testsuite/gcc.target/arm/g2.c @@ -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)); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7d83bd8740f..9d2958626ad 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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__