Patchwork [testsuite] replace gcc.target/arm/ftest-*.c with compile-only tests

login
register
mail settings
Submitter Janis Johnson
Date Jan. 16, 2013, 6 p.m.
Message ID <50F6EAA9.80800@mentor.com>
Download mbox | patch
Permalink /patch/212900/
State New
Headers show

Comments

Janis Johnson - Jan. 16, 2013, 6 p.m.
On 01/16/2013 05:53 AM, Nick Clifton wrote:
> Hi Janis,
> 
>> The gcc.target/arm/ftest-*.c tests check various macros that are set for
>> ARM targets by setting flags based on preprocessor directives that check
>> those macros.  The tests are skipped if the current test platform
>> doesn't support executing programs for the architecture for which flags
>> are being checked.  There are several problems with these tests:
> 
> I like most of this patch.  The only part I am unhappy with is the new
> dg-skip-if statements to skip the test when -march or -mthumb is
> specified as part of the overall command line.  I think that the
> current dg-require-effective-target statements are enough.  Can you
> provide an example of a case where they do not work ?
> 
> Cheers
>   Nick


The "dg-require-effective-target arm_arch_v4_multilib" and friends
don't do what they're meant to do and are the reason for rewriting the
tests.

The "dg-require-effective-target arm_nothumb" isn't necessary because
thumb support is there by default it will be overridden by -marm.  If
thumb support is turned on by multilib options then it can't be
overridden, so it's necessary to look for the flag.

I've modified the tests a bit in this new version of the patch to skip
the test if the multilib includes -march with a value other than the
one being tested, rather than for _any_ use of -march.  That's necessary
because the multilib options come at the end of the command line and
override the options specified by the test.  A test looking for macros
set for -march=armv4 is going to fail if the test is compiled with
-march=armv5.

The tests are meant to check that the macros are defined for either
-mthumb or -marm and add those options explicitly.  Values for -march
that can be used with either have tests for both.  Some -march values
can be used only for -marm or -mthumb (or their defaults) and would fail
to compile if the multilib flags use the wrong one of those.

A multilib with no flags will run all of these tests.  A multilib that
uses "-march=armv8-a -mthumb" will run only the test for those options
and skip all of the others.

I don't know why some of the tests required arm_eabi, but I can't see
any reason for it being necessary for this version of the tests so I've
dropped it.

OK?

Janis
2013-01-16  Janis Johnson  <janisjo@codesourcery.com>

	* gcc.target/arm/ftest-support.h: Replace for compile-only tests.
	* gcc.target/arm/ftest-support-arm.h: Delete.
	* gcc.target/arm/ftest-support-thumb.h: Delete.
	* gcc.target/arm/ftest-armv4-arm.c: Replace with compile-only test.
	* gcc.target/arm/ftest-armv4t-arm.c: Likewise.
	* gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv5t-arm.c: Likewise.
	* gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv5te-arm.c: Likewise.
	* gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv6-arm.c: Likewise.
	* gcc.target/arm/ftest-armv6-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv6k-arm.c: Likewise.
	* gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
	* gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv6z-arm.c: Likewise.
	* gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv7a-arm.c: Likewise.
	* gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv7r-arm.c: Likewise.
	* gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
	* gcc.target/arm/ftest-armv8a-arm.c: Likewise.
	* gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
Nick Clifton - Jan. 17, 2013, 3:02 p.m.
Hi Janis,

 > 2013-01-16  Janis Johnson  <janisjo@codesourcery.com>
 >
 >	* gcc.target/arm/ftest-support.h: Replace for compile-only tests.
 >	* gcc.target/arm/ftest-support-arm.h: Delete.
 >	* gcc.target/arm/ftest-support-thumb.h: Delete.
 >	* gcc.target/arm/ftest-armv4-arm.c: Replace with compile-only test.
 >	* gcc.target/arm/ftest-armv4t-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv5t-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv5te-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv6-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv6-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv6k-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv6z-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv7a-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv7r-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
 >	* gcc.target/arm/ftest-armv8a-arm.c: Likewise.
 >	* gcc.target/arm/ftest-armv8a-thumb.c: Likewise.

Approved - please apply.

Cheers
   Nick

Patch

Index: gcc.target/arm/ftest-support.h
===================================================================
--- gcc.target/arm/ftest-support.h	(revision 195216)
+++ gcc.target/arm/ftest-support.h	(working copy)
@@ -1,84 +1,156 @@ 
-#if 0
-#define INTERNAL_DEBUG 1
+/* For each of several ARM architecture features, check that relevant
+   macros are defined or not, and that they have the expected values.  */
+
+#ifdef NEED_ARM_ARCH
+# ifdef __ARM_ARCH
+#  if __ARM_ARCH != VALUE_ARM_ARCH
+#   error __ARM_ARCH has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH
+#  error __ARM_ARCH is defined but should not be
+# endif
 #endif
 
-#ifdef INTERNAL_DEBUG
-#include <stdio.h>
+#ifdef NEED_ARM_ARCH_ISA_ARM
+# ifdef __ARM_ARCH_ISA_ARM
+#  if __ARM_ARCH_ISA_ARM != VALUE_ARM_ARCH_ISA_ARM
+#   error __ARM_ARCH_ISA_ARM has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_ISA_ARM is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_ARM
+#  error __ARM_ARCH_ISA_ARM is defined but should not be
+# endif
 #endif
 
-extern void abort (void);
+#ifdef NEED_ARM_ARCH_ISA_THUMB
+# ifdef __ARM_ARCH_ISA_THUMB
+#  if __ARM_ARCH_ISA_THUMB != VALUE_ARM_ARCH_ISA_THUMB
+#   error __ARM_ARCH_ISA_THUMB has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_ISA_THUMB is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_THUMB
+#  error __ARM_ARCH_ISA_THUMB is defined but should not be
+# endif
+#endif
 
-enum architecture {
-  ARCH_V4 = 0,
-  ARCH_V4T,
-  ARCH_V5T,
-  ARCH_V5TE,
-  ARCH_V6,
-  ARCH_V6K,
-  ARCH_V6T2,
-  ARCH_V6Z,
-  ARCH_V6M,
-  ARCH_V7A,
-  ARCH_V7R,
-  ARCH_V7M,
-  ARCH_V7EM,
-  ARCH_V8A,
-  ARCH_COUNT
-};
+#ifdef NEED_ARM_ARCH_PROFILE
+# ifdef __ARM_ARCH_PROFILE
+#  if __ARM_ARCH_PROFILE != VALUE_ARM_ARCH_PROFILE
+#   error __ARM_ARCH_PROFILE has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_PROFILE is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_PROFILE
+#  error __ARM_ARCH_PROFILE is defined but should not be
+# endif
+#endif
 
-#define NUM_FEATURES 11
-int feature_matrix[ARCH_COUNT][NUM_FEATURES];
+#ifdef NEED_ARM_FEATURE_UNALIGNED
+# ifdef __ARM_FEATURE_UNALIGNED
+#  if __ARM_FEATURE_UNALIGNED != VALUE_ARM_FEATURE_UNALIGNED
+#   error __ARM_FEATURE_UNALIGNED has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_UNALIGNED is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_UNALIGNED
+#  error __ARM_FEATURE_UNALIGNED is defined but should not be
+# endif
+#endif
 
-int
-ftest (int arch)
-{
-  int features[NUM_FEATURES] = {0};
-  int y;
+#ifdef NEED_ARM_FEATURE_LDREX
+# ifdef __ARM_FEATURE_LDREX
+#  if __ARM_FEATURE_LDREX != VALUE_ARM_FEATURE_LDREX
+#   error __ARM_FEATURE_LDREX has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_LDREX is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_LDREX
+#  error __ARM_FEATURE_LDREX is defined but should not be
+# endif
+#endif
 
-  for (y = 0; y < NUM_FEATURES; ++y)
-    features[y] = 0;
+#ifdef NEED_ARM_FEATURE_CLZ
+# ifdef __ARM_FEATURE_CLZ
+#  if __ARM_FEATURE_CLZ != VALUE_ARM_FEATURE_CLZ
+#   error __ARM_FEATURE_CLZ has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_CLZ is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_CLZ
+#  error __ARM_FEATURE_CLZ is defined but should not be
+# endif
+#endif
 
-#ifdef __ARM_ARCH
-  features[0] = __ARM_ARCH;
+#ifdef NEED_ARM_FEATURE_DSP
+# ifdef __ARM_FEATURE_DSP
+#  if __ARM_FEATURE_DSP != VALUE_ARM_FEATURE_DSP
+#   error __ARM_FEATURE_DSP has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_DSP is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_DSP
+#  error __ARM_FEATURE_DSP is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_ISA_ARM
-  features[1] = __ARM_ARCH_ISA_ARM;
+
+#ifdef NEED_ARM_FEATURE_SIMD32
+# ifdef __ARM_FEATURE_SIMD32
+#  if __ARM_FEATURE_SIMD32 != VALUE_ARM_FEATURE_SIMD32
+#   error __ARM_FEATURE_SIMD32 has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_SIMD32 is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SIMD32
+#  error __ARM_FEATURE_SIMD32 is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_ISA_THUMB
-  features[2] = __ARM_ARCH_ISA_THUMB;
+
+#ifdef NEED_ARM_FEATURE_QBIT
+# ifdef __ARM_FEATURE_QBIT
+#  if __ARM_FEATURE_QBIT != VALUE_ARM_FEATURE_QBIT
+#   error __ARM_FEATURE_QBIT has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_QBIT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_QBIT
+#  error __ARM_FEATURE_QBIT is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_PROFILE
-  features[3] = __ARM_ARCH_PROFILE;
+
+#ifdef NEED_ARM_FEATURE_SAT
+# ifdef __ARM_FEATURE_SAT
+#  if __ARM_FEATURE_SAT != VALUE_ARM_FEATURE_SAT
+#   error __ARM_FEATURE_SAT has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_SAT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SAT
+#  error __ARM_FEATURE_SAT is defined but should not be
+# endif
 #endif
-#ifdef __ARM_FEATURE_UNALIGNED
-  features[4] = __ARM_FEATURE_UNALIGNED;
-#endif
-#ifdef __ARM_FEATURE_LDREX
-  features[5] = __ARM_FEATURE_LDREX;
-#endif
-#ifdef __ARM_FEATURE_CLZ
-  features[6] = __ARM_FEATURE_CLZ;
-#endif
-#ifdef __ARM_FEATURE_DSP
-  features[7] = __ARM_FEATURE_DSP;
-#endif
-#ifdef __ARM_FEATURE_SIMD32
-  features[8] = __ARM_FEATURE_SIMD32;
-#endif
-#ifdef __ARM_FEATURE_QBIT
-  features[9] = __ARM_FEATURE_QBIT;
-#endif
-#ifdef __ARM_FEATURE_SAT
-  features[10] = __ARM_FEATURE_SAT;
-#endif
-  for (y = 0; y < NUM_FEATURES; ++y)
-    if (feature_matrix[arch][y] != features[y])
-      {
-#ifdef INTERNAL_DEBUG
-	printf ("%d, %d, %d, %d\n", arch, y, feature_matrix[arch][y], features[y]);
-#endif
-        abort ();
-      }
-  return 0;
-}
-
Index: gcc.target/arm/ftest-armv4-arm.c
===================================================================
--- gcc.target/arm/ftest-armv4-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv4-arm.c	(working copy)
@@ -1,14 +1,15 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v4_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#include "ftest-support.h"
+
+
Index: gcc.target/arm/ftest-armv4t-arm.c
===================================================================
--- gcc.target/arm/ftest-armv4t-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv4t-arm.c	(working copy)
@@ -1,14 +1,16 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v4t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4t } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv4t-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv4t-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv4t-thumb.c	(working copy)
@@ -1,14 +1,16 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v4t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v4t } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5t-arm.c
===================================================================
--- gcc.target/arm/ftest-armv5t-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv5t-arm.c	(working copy)
@@ -1,14 +1,19 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v5t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5t } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5t-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv5t-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv5t-thumb.c	(working copy)
@@ -1,14 +1,16 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v5t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5t } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5te-arm.c
===================================================================
--- gcc.target/arm/ftest-armv5te-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv5te-arm.c	(working copy)
@@ -1,14 +1,25 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v5te_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5te } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5TE);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5te-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv5te-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv5te-thumb.c	(working copy)
@@ -1,14 +1,16 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v5te_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5te } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5TE);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6-arm.c	(working copy)
@@ -1,14 +1,37 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6-thumb.c	(working copy)
@@ -1,14 +1,19 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6 } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6k-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6k-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6k-arm.c	(working copy)
@@ -1,14 +1,37 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6k_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6k } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6K);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6k-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6k-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6k-thumb.c	(working copy)
@@ -1,14 +1,19 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6k_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6k } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6K);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6m-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6m-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6m-thumb.c	(working copy)
@@ -1,14 +1,16 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6m_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6m } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6M);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6t2-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6t2-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6t2-arm.c	(working copy)
@@ -1,14 +1,37 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6t2_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6T2);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6t2-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6t2-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6t2-thumb.c	(working copy)
@@ -1,14 +1,34 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6t2_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6T2);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6z-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6z-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6z-arm.c	(working copy)
@@ -1,14 +1,37 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6z_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6z } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6Z);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6z-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6z-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv6z-thumb.c	(working copy)
@@ -1,14 +1,19 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6z_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6z } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6Z);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7a-arm.c
===================================================================
--- gcc.target/arm/ftest-armv7a-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7a-arm.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v7a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7a } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7a-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7a-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7a-thumb.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=aramv7-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7a } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7em-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7em-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7em-thumb.c	(working copy)
@@ -1,14 +1,37 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7em_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7e-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7em } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7EM);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7m-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7m-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7m-thumb.c	(working copy)
@@ -1,14 +1,31 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7m_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=arm7-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7m } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7M);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7r-arm.c
===================================================================
--- gcc.target/arm/ftest-armv7r-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7r-arm.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v7r_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7r } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7R);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7r-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7r-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv7r-thumb.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7r_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7r } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7R);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv8a-arm.c
===================================================================
--- gcc.target/arm/ftest-armv8a-arm.c	(revision 195216)
+++ gcc.target/arm/ftest-armv8a-arm.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v8a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v8a } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
 
-int
-main (void)
-{
-  return ftest (ARCH_V8A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv8a-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv8a-thumb.c	(revision 195216)
+++ gcc.target/arm/ftest-armv8a-thumb.c	(working copy)
@@ -1,14 +1,40 @@ 
-/* { dg-do run } */
-/* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v8a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v8a } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
 
-int
-main (void)
-{
-  return ftest (ARCH_V8A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"