Commit 09411ce3 by Janis Johnson Committed by Janis Johnson

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
parent 1e4b2746
2011-07-07 Janis Johnson <janisjo@codesourcery.com>
* 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 <jakub@redhat.com> 2011-07-07 Jakub Jelinek <jakub@redhat.com>
PR debug/49522 PR debug/49522
......
/* { dg-do compile } */ /* { 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) long long foolong (long long x, short *a, short *b)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -march=armv7-a" } */ /* { dg-require-effective-target arm_dsp } */
/* { dg-options "-O2" } */
long long int long long int
foo (long long x, int in) foo (long long x, int in)
...@@ -10,4 +11,4 @@ foo (long long x, int in) ...@@ -10,4 +11,4 @@ foo (long long x, int in)
return x + b * a; return x + b * a;
} }
/* { dg-final { scan-assembler "smlaltb" } } */ /* { dg-final { scan-assembler "smlaltb\\t" } } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -march=armv7-a" } */ /* { dg-require-effective-target arm_dsp } */
/* { dg-options "-O2" } */
long long int long long int
foo (long long x, int in1, int in2) foo (long long x, int in1, int in2)
...@@ -10,4 +11,4 @@ foo (long long x, int in1, int in2) ...@@ -10,4 +11,4 @@ foo (long long x, int in1, int in2)
return x + b * a; return x + b * a;
} }
/* { dg-final { scan-assembler "smlaltt" } } */ /* { dg-final { scan-assembler "smlaltt\\t" } } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -march=armv7-a" } */ /* { dg-require-effective-target arm_dsp } */
/* { dg-options "-O2" } */
int int
foo (int x, int in) foo (int x, int in)
...@@ -10,4 +11,4 @@ foo (int x, int in) ...@@ -10,4 +11,4 @@ foo (int x, int in)
return x + b * a; return x + b * a;
} }
/* { dg-final { scan-assembler "smlatb" } } */ /* { dg-final { scan-assembler "smlatb\\t" } } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -march=armv7-a" } */ /* { dg-require-effective-target arm_dsp } */
/* { dg-options "-O2" } */
int int
foo (int x, int in1, int in2) foo (int x, int in1, int in2)
...@@ -10,4 +11,4 @@ foo (int x, int in1, int in2) ...@@ -10,4 +11,4 @@ foo (int x, int in1, int in2)
return x + b * a; return x + b * a;
} }
/* { dg-final { scan-assembler "smlatt" } } */ /* { dg-final { scan-assembler "smlatt\\t" } } */
/* { dg-do compile } */ /* { 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) int mac(const short *a, const short *b, int sqr, int *sum)
{ {
......
/* { dg-do compile } */ /* { 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) void vec_mpy(int y[], const short x[], short scaler)
{ {
......
/* { dg-do compile } */ /* { 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) int mac(const short *a, const short *b, int sqr, int *sum)
{ {
......
/* { dg-do compile } */ /* { 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) int mac(const int *a, const int *b, long long sqr, long long *sum)
{ {
......
...@@ -1916,6 +1916,18 @@ proc check_effective_target_arm_hard_vfp_ok { } { ...@@ -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 # Add the options needed for NEON. We need either -mfloat-abi=softfp
# or -mfloat-abi=hard, but if one is already specified by the # or -mfloat-abi=hard, but if one is already specified by the
# multilib, use it. Similarly, if a -mfpu option already enables # multilib, use it. Similarly, if a -mfpu option already enables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment