From 09411ce3e6f15cc81e39d5a4c89e15f30d2fe79e Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Thu, 7 Jul 2011 17:44:14 +0000 Subject: [PATCH] target-supports.exp (check_effective_target_arm_dsp): New. * lib/target-supports.exp (check_effective_target_arm_dsp): New. * gcc.target/arm/mla-2.c: Use it instead of specific -march. * gcc.target/arm/wmul-1.c: Likewise. * gcc.target/arm/wmul-2.c: Likewise. * gcc.target/arm/wmul-3.c: Likewise. * gcc.target/arm/wmul-4.c: Likewise. * gcc.target/arm/smlaltb-1.c: Require arm_dsp, don't specify -march, add tab after scan target. * gcc.target/arm/smlaltt-1.c: Likewise. * gcc.target/arm/smlatb-1.c: Likewise. * gcc.target/arm/smlatt-1.c: Likewise. From-SVN: r175993 --- gcc/testsuite/ChangeLog | 14 ++++++++++++++ gcc/testsuite/gcc.target/arm/mla-2.c | 3 ++- gcc/testsuite/gcc.target/arm/smlaltb-1.c | 5 +++-- gcc/testsuite/gcc.target/arm/smlaltt-1.c | 5 +++-- gcc/testsuite/gcc.target/arm/smlatb-1.c | 5 +++-- gcc/testsuite/gcc.target/arm/smlatt-1.c | 5 +++-- gcc/testsuite/gcc.target/arm/wmul-1.c | 3 ++- gcc/testsuite/gcc.target/arm/wmul-2.c | 3 ++- gcc/testsuite/gcc.target/arm/wmul-3.c | 3 ++- gcc/testsuite/gcc.target/arm/wmul-4.c | 3 ++- gcc/testsuite/lib/target-supports.exp | 12 ++++++++++++ 11 files changed, 48 insertions(+), 13 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c54bd86e958..7586f83a89a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2011-07-07 Janis Johnson + + * lib/target-supports.exp (check_effective_target_arm_dsp): New. + * gcc.target/arm/mla-2.c: Use it instead of specific -march. + * gcc.target/arm/wmul-1.c: Likewise. + * gcc.target/arm/wmul-2.c: Likewise. + * gcc.target/arm/wmul-3.c: Likewise. + * gcc.target/arm/wmul-4.c: Likewise. + * gcc.target/arm/smlaltb-1.c: Require arm_dsp, don't specify -march, + add tab after scan target. + * gcc.target/arm/smlaltt-1.c: Likewise. + * gcc.target/arm/smlatb-1.c: Likewise. + * gcc.target/arm/smlatt-1.c: Likewise. + 2011-07-07 Jakub Jelinek PR debug/49522 diff --git a/gcc/testsuite/gcc.target/arm/mla-2.c b/gcc/testsuite/gcc.target/arm/mla-2.c index bdc508d878c..1e3ca200b2e 100644 --- a/gcc/testsuite/gcc.target/arm/mla-2.c +++ b/gcc/testsuite/gcc.target/arm/mla-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ long long foolong (long long x, short *a, short *b) { diff --git a/gcc/testsuite/gcc.target/arm/smlaltb-1.c b/gcc/testsuite/gcc.target/arm/smlaltb-1.c index b83fc74f6e5..1472c9b3fa1 100644 --- a/gcc/testsuite/gcc.target/arm/smlaltb-1.c +++ b/gcc/testsuite/gcc.target/arm/smlaltb-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ long long int foo (long long x, int in) @@ -10,4 +11,4 @@ foo (long long x, int in) return x + b * a; } -/* { dg-final { scan-assembler "smlaltb" } } */ +/* { dg-final { scan-assembler "smlaltb\\t" } } */ diff --git a/gcc/testsuite/gcc.target/arm/smlaltt-1.c b/gcc/testsuite/gcc.target/arm/smlaltt-1.c index 2604d9bf0be..6bcbce0b958 100644 --- a/gcc/testsuite/gcc.target/arm/smlaltt-1.c +++ b/gcc/testsuite/gcc.target/arm/smlaltt-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ long long int foo (long long x, int in1, int in2) @@ -10,4 +11,4 @@ foo (long long x, int in1, int in2) return x + b * a; } -/* { dg-final { scan-assembler "smlaltt" } } */ +/* { dg-final { scan-assembler "smlaltt\\t" } } */ diff --git a/gcc/testsuite/gcc.target/arm/smlatb-1.c b/gcc/testsuite/gcc.target/arm/smlatb-1.c index 820dcddfadc..d73aa18ea7c 100644 --- a/gcc/testsuite/gcc.target/arm/smlatb-1.c +++ b/gcc/testsuite/gcc.target/arm/smlatb-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ int foo (int x, int in) @@ -10,4 +11,4 @@ foo (int x, int in) return x + b * a; } -/* { dg-final { scan-assembler "smlatb" } } */ +/* { dg-final { scan-assembler "smlatb\\t" } } */ diff --git a/gcc/testsuite/gcc.target/arm/smlatt-1.c b/gcc/testsuite/gcc.target/arm/smlatt-1.c index 2a606340e28..d7fb0340009 100644 --- a/gcc/testsuite/gcc.target/arm/smlatt-1.c +++ b/gcc/testsuite/gcc.target/arm/smlatt-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ int foo (int x, int in1, int in2) @@ -10,4 +11,4 @@ foo (int x, int in1, int in2) return x + b * a; } -/* { dg-final { scan-assembler "smlatt" } } */ +/* { dg-final { scan-assembler "smlatt\\t" } } */ diff --git a/gcc/testsuite/gcc.target/arm/wmul-1.c b/gcc/testsuite/gcc.target/arm/wmul-1.c index ccb3041551a..426c9393f20 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-1.c +++ b/gcc/testsuite/gcc.target/arm/wmul-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv6t2" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ int mac(const short *a, const short *b, int sqr, int *sum) { diff --git a/gcc/testsuite/gcc.target/arm/wmul-2.c b/gcc/testsuite/gcc.target/arm/wmul-2.c index 0c092f10115..898b5f065cb 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-2.c +++ b/gcc/testsuite/gcc.target/arm/wmul-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv6t2" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ void vec_mpy(int y[], const short x[], short scaler) { diff --git a/gcc/testsuite/gcc.target/arm/wmul-3.c b/gcc/testsuite/gcc.target/arm/wmul-3.c index 325dcebbbda..83f73fba727 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-3.c +++ b/gcc/testsuite/gcc.target/arm/wmul-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv6t2" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ int mac(const short *a, const short *b, int sqr, int *sum) { diff --git a/gcc/testsuite/gcc.target/arm/wmul-4.c b/gcc/testsuite/gcc.target/arm/wmul-4.c index e8642f8aed1..a297bda2182 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-4.c +++ b/gcc/testsuite/gcc.target/arm/wmul-4.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv6t2" } */ +/* { dg-require-effective-target arm_dsp } */ +/* { dg-options "-O2" } */ int mac(const int *a, const int *b, long long sqr, long long *sum) { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7db156f3a12..476a2e660b3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1916,6 +1916,18 @@ proc check_effective_target_arm_hard_vfp_ok { } { } } +# Return 1 if this is an ARM target that supports DSP multiply with +# current multilib flags. + +proc check_effective_target_arm_dsp { } { + return [check_no_compiler_messages arm_dsp assembly { + #ifndef __ARM_FEATURE_DSP + #error not DSP + #endif + int i; + }] +} + # Add the options needed for NEON. We need either -mfloat-abi=softfp # or -mfloat-abi=hard, but if one is already specified by the # multilib, use it. Similarly, if a -mfpu option already enables -- 2.30.2