Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 175921)
+++ lib/target-supports.exp	(working copy)
@@ -1911,6 +1911,18 @@
     }
 }
 
+# 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
Index: gcc.target/arm/mla-2.c
===================================================================
--- gcc.target/arm/mla-2.c	(revision 175921)
+++ gcc.target/arm/mla-2.c	(working copy)
@@ -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)
 {
Index: gcc.target/arm/wmul-1.c
===================================================================
--- gcc.target/arm/wmul-1.c	(revision 175921)
+++ gcc.target/arm/wmul-1.c	(working copy)
@@ -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)
 {
Index: gcc.target/arm/wmul-2.c
===================================================================
--- gcc.target/arm/wmul-2.c	(revision 175921)
+++ gcc.target/arm/wmul-2.c	(working copy)
@@ -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)
 {
Index: gcc.target/arm/wmul-3.c
===================================================================
--- gcc.target/arm/wmul-3.c	(revision 175921)
+++ gcc.target/arm/wmul-3.c	(working copy)
@@ -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)
 {
Index: gcc.target/arm/wmul-4.c
===================================================================
--- gcc.target/arm/wmul-4.c	(revision 175921)
+++ gcc.target/arm/wmul-4.c	(working copy)
@@ -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)
 {
Index: gcc.target/arm/smlaltb-1.c
===================================================================
--- gcc.target/arm/smlaltb-1.c	(revision 175921)
+++ gcc.target/arm/smlaltb-1.c	(working copy)
@@ -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 @@
   return x + b * a;
 }
 
-/* { dg-final { scan-assembler "smlaltb" } } */
+/* { dg-final { scan-assembler "smlaltb\\t" } } */
Index: gcc.target/arm/smlaltt-1.c
===================================================================
--- gcc.target/arm/smlaltt-1.c	(revision 175921)
+++ gcc.target/arm/smlaltt-1.c	(working copy)
@@ -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 @@
   return x + b * a;
 }
 
-/* { dg-final { scan-assembler "smlaltt" } } */
+/* { dg-final { scan-assembler "smlaltt\\t" } } */
Index: gcc.target/arm/smlatb-1.c
===================================================================
--- gcc.target/arm/smlatb-1.c	(revision 175921)
+++ gcc.target/arm/smlatb-1.c	(working copy)
@@ -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 @@
   return x + b * a;
 }
 
-/* { dg-final { scan-assembler "smlatb" } } */
+/* { dg-final { scan-assembler "smlatb\\t" } } */
Index: gcc.target/arm/smlatt-1.c
===================================================================
--- gcc.target/arm/smlatt-1.c	(revision 175921)
+++ gcc.target/arm/smlatt-1.c	(working copy)
@@ -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 @@
   return x + b * a;
 }
 
-/* { dg-final { scan-assembler "smlatt" } } */
+/* { dg-final { scan-assembler "smlatt\\t" } } */
