diff mbox series

[ARM/FDPIC,v5,20/21,ARM,testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC

Message ID 20190515124006.25840-21-christophe.lyon@st.com
State New
Headers show
Series FDPIC ABI for ARM | expand

Commit Message

Christophe Lyon May 15, 2019, 12:39 p.m. UTC
Since FDPIC currently supports arm and thumb-2 modes only, these tests
fail because they enforce an architecture version that doesn't match
these restrictions.

This patch introduces new values for the arm_arch effective-target
(v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as
needed, and adds them to the relevant tests.  It also adds the
corresponding non-thumb effective-target to the tests that were
missing it.

2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

	* lib/target-supports.exp
	(check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,
	v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.
	* gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch
	effective-target.
	* gcc.target/arm/attr-unaligned-load-ice.c: Likewise.
	* gcc.target/arm/attr_arm-err.c: Likewise.
	* gcc.target/arm/ftest-armv4-arm.c: Likewise.
	* 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/g2.c: Likewise.
	* gcc.target/arm/macro_defs1.c: Likewise.
	* gcc.target/arm/pr59858.c: Likewise.
	* gcc.target/arm/pr65647-2.c: Likewise.
	* gcc.target/arm/pr79058.c: Likewise.
	* gcc.target/arm/pr83712.c: Likewise.
	* gcc.target/arm/pragma_arch_switch_2.c: Likewise.
	* gcc.target/arm/scd42-1.c: Likewise.
	* gcc.target/arm/scd42-2.c: Likewise.
	* gcc.target/arm/scd42-3.c: Likewise.
	* gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

-- 
2.6.3

Comments

Kyrill Tkachov July 19, 2019, 9 a.m. UTC | #1
On 5/15/19 1:39 PM, Christophe Lyon wrote:
> Since FDPIC currently supports arm and thumb-2 modes only, these tests

> fail because they enforce an architecture version that doesn't match

> these restrictions.

>

> This patch introduces new values for the arm_arch effective-target

> (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

> needed, and adds them to the relevant tests.  It also adds the

> corresponding non-thumb effective-target to the tests that were

> missing it.

>

> 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

>

>         * lib/target-supports.exp

>         (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

>         v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

>         * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

>         effective-target.

>         * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

>         * gcc.target/arm/attr_arm-err.c: Likewise.

>         * gcc.target/arm/ftest-armv4-arm.c: Likewise.

>         * 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/g2.c: Likewise.

>         * gcc.target/arm/macro_defs1.c: Likewise.

>         * gcc.target/arm/pr59858.c: Likewise.

>         * gcc.target/arm/pr65647-2.c: Likewise.

>         * gcc.target/arm/pr79058.c: Likewise.

>         * gcc.target/arm/pr83712.c: Likewise.

>         * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

>         * gcc.target/arm/scd42-1.c: Likewise.

>         * gcc.target/arm/scd42-2.c: Likewise.

>         * gcc.target/arm/scd42-3.c: Likewise.

>         * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

>

Ok.

This looks like a good improvement on its own.

Thanks,

Kyrill



> Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

>

> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c 

> b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> index d144b70..4e695cd 100644

> --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> @@ -1,4 +1,4 @@

> -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target 

> arm*-*-* } } */

>  /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } { 

> "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

>  /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" { 

> target arm*-*-* } } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c 

> b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> index 88528f1..886a012 100644

> --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6k" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

>  /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

>  /* { dg-add-options arm_arch_v6k } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c 

> b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> index e1ed1c1..2eeb522 100644

> --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> @@ -2,6 +2,7 @@

>     Verify that unaligned_access is correctly with attribute target.  */

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6" } } */

> +/* { dg-require-effective-target arm_arch_v6_ok } */

>  /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

>  /* { dg-add-options arm_arch_v6 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c 

> b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> index 630c06a..d410056 100644

> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> @@ -2,6 +2,7 @@

>  /* { dg-do compile } */

>  /* { dg-require-effective-target arm_arm_ok } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6-m" } } */

> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>  /* { dg-add-options arm_arch_v6m } */

>

>  int __attribute__((target("arm")))

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> index 4b48ef8..447a8ec 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv4" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v4_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v4 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> index 016506f..05db533 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv4t" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v4t_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v4t } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> index 9ef944e..78878f7 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv4t" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v4t } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> index a9403e9..bea25d09 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv5t" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v5t_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v5t } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> index f3ad07e..b25d17d 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv5t" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v5t } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> index f98c01a..7b37c7f 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv5te" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v5te } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> index 5d71787..27a64a2 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv5te" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v5te } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> index 88a5089..bfab765 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v6 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> index 90ef9d2..15a6d75 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v6 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> index 8de021a..721c9f9 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6k" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6k_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v6k } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> index c2fc270..b3b6ecf 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6k" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v6k } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> index ee075e2..27f71be 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6-m" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v6m } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> index 83b4bc4..259d2b5 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6t2" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v6t2 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> index 1a1cbc5..e624ec5 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6t2" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v6t2 } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> index e2df0d4..66380bf 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6z" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-mthumb" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6z_ok } */

>  /* { dg-options "-marm" } */

>  /* { dg-add-options arm_arch_v6z } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c 

> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> index e4b94ef..23a4fcd 100644

> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6z" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

>  /* { dg-options "-mthumb" } */

>  /* { dg-add-options arm_arch_v6z } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/g2.c 

> b/gcc/testsuite/gcc.target/arm/g2.c

> index e368017..da68c8b 100644

> --- a/gcc/testsuite/gcc.target/arm/g2.c

> +++ b/gcc/testsuite/gcc.target/arm/g2.c

> @@ -4,6 +4,7 @@

>  /* { 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_ok } */

>  /* { dg-require-effective-target arm32 } */

>

>  /* Brett Gaines' test case. */

> diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c 

> b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> index 4cc9ae6..655ba93 100644

> --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-march=*" } { "-march=armv6-m" } } */

>  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { 

> "-marm" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>  /* { dg-options "-march=armv6-m -mthumb" } */

>

>  #ifdef __ARM_NEON_FP

> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c 

> b/gcc/testsuite/gcc.target/arm/pr59858.c

> index a944b9a..bcfd5d5 100644

> --- a/gcc/testsuite/gcc.target/arm/pr59858.c

> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

> @@ -1,6 +1,7 @@

>  /* { dg-do compile } */

>  /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb 

> -fno-stack-protector -Os -fno-tree-loop-optimize 

> -fno-tree-dominator-opts -fPIC -w" } */

>  /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft 

> -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

>

>  typedef enum {

>   REG_ENOSYS = -1,

> diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c 

> b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> index f2985f8..3d9e75f 100644

> --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> @@ -1,4 +1,5 @@

>  /* { dg-do compile } */

> +/* { dg-require-effective-target arm_arch_v6_ok } */

>  /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

>

>  typedef struct {

> diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c 

> b/gcc/testsuite/gcc.target/arm/pr79058.c

> index 54a1d8a..7d078ac 100644

> --- a/gcc/testsuite/gcc.target/arm/pr79058.c

> +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

> @@ -1,5 +1,6 @@

>  /* { dg-do compile } */

>  /* { dg-require-effective-target arm_arm_ok } */

> +/* { dg-require-effective-target arm_arch_v4_ok } */

>  /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { 

> "-mcpu=arm7tdmi" } } */

>  /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

>

> diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c 

> b/gcc/testsuite/gcc.target/arm/pr83712.c

> index 8ed8cdf..4902ec9 100644

> --- a/gcc/testsuite/gcc.target/arm/pr83712.c

> +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

> @@ -1,4 +1,5 @@

>  /* { dg-do compile } */

> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

>  /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

>  #pragma GCC optimize ("-O2")

>

> diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c 

> b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> index b6211f9..c3361e7 100644

> --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> @@ -2,6 +2,7 @@

>  /* { dg-skip-if "instruction not valid on thumb" { *-*-* } { 

> "-mthumb" } { "" } } */

>  /* { dg-do assemble } */

>  /* { dg-require-effective-target arm_arm_ok } */

> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>  /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99 

> -marm" } */

>

>  #pragma GCC target ("arch=armv6")

> diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c 

> b/gcc/testsuite/gcc.target/arm/scd42-1.c

> index be60e64..2b8fc0b 100644

> --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

> +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

> @@ -3,6 +3,7 @@

>  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { 

> "-march=*" } { "-march=xscale" } } */

>  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*" 

> } { "-mcpu=xscale" } } */

>  /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { 

> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>  /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

>

>  unsigned load1(void) __attribute__ ((naked));

> diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c 

> b/gcc/testsuite/gcc.target/arm/scd42-2.c

> index 6d9e5e1..4181a75 100644

> --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

> +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

> @@ -4,6 +4,7 @@

>  /* { 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 arm32 } */

> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>  /* { dg-options "-mcpu=xscale -O -marm" } */

>

>  unsigned load2(void) __attribute__ ((naked));

> diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c 

> b/gcc/testsuite/gcc.target/arm/scd42-3.c

> index e566cb2..0afd121 100644

> --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

> +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

> @@ -3,6 +3,7 @@

>  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { 

> "-march=*" } { "-march=xscale" } } */

>  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*" 

> } { "-mcpu=xscale" } } */

>  /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { 

> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>  /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

>

>  unsigned load4(void) __attribute__ ((naked));

> diff --git a/gcc/testsuite/lib/target-supports.exp 

> b/gcc/testsuite/lib/target-supports.exp

> index 60d68f4..3f091c5 100644

> --- a/gcc/testsuite/lib/target-supports.exp

> +++ b/gcc/testsuite/lib/target-supports.exp

> @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

>  foreach { armfunc armflag armdefs } {

>          v4 "-march=armv4 -marm" __ARM_ARCH_4__

>          v4t "-march=armv4t" __ARM_ARCH_4T__

> +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

>          v5t "-march=armv5t" __ARM_ARCH_5T__

> +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

>          v5te "-march=armv5te" __ARM_ARCH_5TE__

> +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

>          v6 "-march=armv6" __ARM_ARCH_6__

> +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

>          v6k "-march=armv6k" __ARM_ARCH_6K__

> +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

>          v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

>          v6z "-march=armv6z" __ARM_ARCH_6Z__

> +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

>          v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

>          v7a "-march=armv7-a" __ARM_ARCH_7A__

>          v7r "-march=armv7-r" __ARM_ARCH_7R__

> -- 

> 2.6.3

>
Christophe Lyon Sept. 6, 2019, 8:01 a.m. UTC | #2
On Fri, 19 Jul 2019 at 11:00, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
>

>

> On 5/15/19 1:39 PM, Christophe Lyon wrote:

> > Since FDPIC currently supports arm and thumb-2 modes only, these tests

> > fail because they enforce an architecture version that doesn't match

> > these restrictions.

> >

> > This patch introduces new values for the arm_arch effective-target

> > (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

> > needed, and adds them to the relevant tests.  It also adds the

> > corresponding non-thumb effective-target to the tests that were

> > missing it.

> >

> > 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

> >

> >         * lib/target-supports.exp

> >         (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

> >         v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

> >         * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

> >         effective-target.

> >         * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

> >         * gcc.target/arm/attr_arm-err.c: Likewise.

> >         * gcc.target/arm/ftest-armv4-arm.c: Likewise.

> >         * 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/g2.c: Likewise.

> >         * gcc.target/arm/macro_defs1.c: Likewise.

> >         * gcc.target/arm/pr59858.c: Likewise.

> >         * gcc.target/arm/pr65647-2.c: Likewise.

> >         * gcc.target/arm/pr79058.c: Likewise.

> >         * gcc.target/arm/pr83712.c: Likewise.

> >         * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

> >         * gcc.target/arm/scd42-1.c: Likewise.

> >         * gcc.target/arm/scd42-2.c: Likewise.

> >         * gcc.target/arm/scd42-3.c: Likewise.

> >         * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

> >

> Ok.

>

> This looks like a good improvement on its own.

>

Sigh, after more testing I found problems :(

> Thanks,

>

> Kyrill

>

>

>

> > Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

> >

> > diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > index d144b70..4e695cd 100644

> > --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > @@ -1,4 +1,4 @@

> > -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

> > +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target

> > arm*-*-* } } */

> >  /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } {

> > "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

> >  /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" {

> > target arm*-*-* } } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > index 88528f1..886a012 100644

> > --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6k" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> >  /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

> >  /* { dg-add-options arm_arch_v6k } */

> >

For instance on arm-linux-gnueabihf (thus defaulting to float-abi=hard),
arm_arch_v6k_thumb fails (because it tries to use thumb-1 + hard-float
which is not supported),
while the test itself would add -mfloat-abi=softfp, thus using a
supported configuration.

Is there a way to pass an argument to an effective-target directive?
(current, if one adds an argument, it's the target selector)

Or shall I add other effective-targets, eg arm_arch_v6k_thumb_softfp_ok?

Christophe

> > diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > index e1ed1c1..2eeb522 100644

> > --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > @@ -2,6 +2,7 @@

> >     Verify that unaligned_access is correctly with attribute target.  */

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6" } } */

> > +/* { dg-require-effective-target arm_arch_v6_ok } */

> >  /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

> >  /* { dg-add-options arm_arch_v6 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > index 630c06a..d410056 100644

> > --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > @@ -2,6 +2,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-require-effective-target arm_arm_ok } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6-m" } } */

> > +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >  /* { dg-add-options arm_arch_v6m } */

> >

> >  int __attribute__((target("arm")))

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > index 4b48ef8..447a8ec 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv4" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v4_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v4 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > index 016506f..05db533 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv4t" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v4t_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v4t } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > index 9ef944e..78878f7 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv4t" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v4t } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > index a9403e9..bea25d09 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv5t" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v5t_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v5t } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > index f3ad07e..b25d17d 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv5t" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v5t } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > index f98c01a..7b37c7f 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv5te" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v5te } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > index 5d71787..27a64a2 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv5te" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v5te } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > index 88a5089..bfab765 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v6 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > index 90ef9d2..15a6d75 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v6 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > index 8de021a..721c9f9 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6k" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6k_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v6k } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > index c2fc270..b3b6ecf 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6k" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v6k } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > index ee075e2..27f71be 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6-m" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v6m } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > index 83b4bc4..259d2b5 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6t2" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v6t2 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > index 1a1cbc5..e624ec5 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6t2" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v6t2 } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > index e2df0d4..66380bf 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6z" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-mthumb" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6z_ok } */

> >  /* { dg-options "-marm" } */

> >  /* { dg-add-options arm_arch_v6z } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > index e4b94ef..23a4fcd 100644

> > --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6z" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

> >  /* { dg-options "-mthumb" } */

> >  /* { dg-add-options arm_arch_v6z } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/g2.c

> > b/gcc/testsuite/gcc.target/arm/g2.c

> > index e368017..da68c8b 100644

> > --- a/gcc/testsuite/gcc.target/arm/g2.c

> > +++ b/gcc/testsuite/gcc.target/arm/g2.c

> > @@ -4,6 +4,7 @@

> >  /* { 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_ok } */

> >  /* { dg-require-effective-target arm32 } */

> >

> >  /* Brett Gaines' test case. */

> > diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > index 4cc9ae6..655ba93 100644

> > --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-march=*" } { "-march=armv6-m" } } */

> >  /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > "-marm" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >  /* { dg-options "-march=armv6-m -mthumb" } */

> >

> >  #ifdef __ARM_NEON_FP

> > diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c

> > b/gcc/testsuite/gcc.target/arm/pr59858.c

> > index a944b9a..bcfd5d5 100644

> > --- a/gcc/testsuite/gcc.target/arm/pr59858.c

> > +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

> > @@ -1,6 +1,7 @@

> >  /* { dg-do compile } */

> >  /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb

> > -fno-stack-protector -Os -fno-tree-loop-optimize

> > -fno-tree-dominator-opts -fPIC -w" } */

> >  /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft

> > -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

> > +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> >

> >  typedef enum {

> >   REG_ENOSYS = -1,

> > diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > index f2985f8..3d9e75f 100644

> > --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > @@ -1,4 +1,5 @@

> >  /* { dg-do compile } */

> > +/* { dg-require-effective-target arm_arch_v6_ok } */

> >  /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

> >

> >  typedef struct {

> > diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c

> > b/gcc/testsuite/gcc.target/arm/pr79058.c

> > index 54a1d8a..7d078ac 100644

> > --- a/gcc/testsuite/gcc.target/arm/pr79058.c

> > +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

> > @@ -1,5 +1,6 @@

> >  /* { dg-do compile } */

> >  /* { dg-require-effective-target arm_arm_ok } */

> > +/* { dg-require-effective-target arm_arch_v4_ok } */

> >  /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } {

> > "-mcpu=arm7tdmi" } } */

> >  /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c

> > b/gcc/testsuite/gcc.target/arm/pr83712.c

> > index 8ed8cdf..4902ec9 100644

> > --- a/gcc/testsuite/gcc.target/arm/pr83712.c

> > +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

> > @@ -1,4 +1,5 @@

> >  /* { dg-do compile } */

> > +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> >  /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

> >  #pragma GCC optimize ("-O2")

> >

> > diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > index b6211f9..c3361e7 100644

> > --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > @@ -2,6 +2,7 @@

> >  /* { dg-skip-if "instruction not valid on thumb" { *-*-* } {

> > "-mthumb" } { "" } } */

> >  /* { dg-do assemble } */

> >  /* { dg-require-effective-target arm_arm_ok } */

> > +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >  /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99

> > -marm" } */

> >

> >  #pragma GCC target ("arch=armv6")

> > diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > index be60e64..2b8fc0b 100644

> > --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > @@ -3,6 +3,7 @@

> >  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > "-march=*" } { "-march=xscale" } } */

> >  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > } { "-mcpu=xscale" } } */

> >  /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >  /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> >

> >  unsigned load1(void) __attribute__ ((naked));

> > diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > index 6d9e5e1..4181a75 100644

> > --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > @@ -4,6 +4,7 @@

> >  /* { 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 arm32 } */

> > +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >  /* { dg-options "-mcpu=xscale -O -marm" } */

> >

> >  unsigned load2(void) __attribute__ ((naked));

> > diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > index e566cb2..0afd121 100644

> > --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > @@ -3,6 +3,7 @@

> >  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > "-march=*" } { "-march=xscale" } } */

> >  /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > } { "-mcpu=xscale" } } */

> >  /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >  /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> >

> >  unsigned load4(void) __attribute__ ((naked));

> > diff --git a/gcc/testsuite/lib/target-supports.exp

> > b/gcc/testsuite/lib/target-supports.exp

> > index 60d68f4..3f091c5 100644

> > --- a/gcc/testsuite/lib/target-supports.exp

> > +++ b/gcc/testsuite/lib/target-supports.exp

> > @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

> >  foreach { armfunc armflag armdefs } {

> >          v4 "-march=armv4 -marm" __ARM_ARCH_4__

> >          v4t "-march=armv4t" __ARM_ARCH_4T__

> > +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

> >          v5t "-march=armv5t" __ARM_ARCH_5T__

> > +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

> >          v5te "-march=armv5te" __ARM_ARCH_5TE__

> > +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

> >          v6 "-march=armv6" __ARM_ARCH_6__

> > +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

> >          v6k "-march=armv6k" __ARM_ARCH_6K__

> > +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> >          v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

> >          v6z "-march=armv6z" __ARM_ARCH_6Z__

> > +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

> >          v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

> >          v7a "-march=armv7-a" __ARM_ARCH_7A__

> >          v7r "-march=armv7-r" __ARM_ARCH_7R__

> > --

> > 2.6.3

> >
Kyrill Tkachov Sept. 6, 2019, 8:28 a.m. UTC | #3
On 9/6/19 9:01 AM, Christophe Lyon wrote:
> On Fri, 19 Jul 2019 at 11:00, Kyrill Tkachov

> <kyrylo.tkachov@foss.arm.com> wrote:

>>

>> On 5/15/19 1:39 PM, Christophe Lyon wrote:

>>> Since FDPIC currently supports arm and thumb-2 modes only, these tests

>>> fail because they enforce an architecture version that doesn't match

>>> these restrictions.

>>>

>>> This patch introduces new values for the arm_arch effective-target

>>> (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

>>> needed, and adds them to the relevant tests.  It also adds the

>>> corresponding non-thumb effective-target to the tests that were

>>> missing it.

>>>

>>> 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

>>>

>>>          * lib/target-supports.exp

>>>          (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

>>>          v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

>>>          * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

>>>          effective-target.

>>>          * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

>>>          * gcc.target/arm/attr_arm-err.c: Likewise.

>>>          * gcc.target/arm/ftest-armv4-arm.c: Likewise.

>>>          * 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/g2.c: Likewise.

>>>          * gcc.target/arm/macro_defs1.c: Likewise.

>>>          * gcc.target/arm/pr59858.c: Likewise.

>>>          * gcc.target/arm/pr65647-2.c: Likewise.

>>>          * gcc.target/arm/pr79058.c: Likewise.

>>>          * gcc.target/arm/pr83712.c: Likewise.

>>>          * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

>>>          * gcc.target/arm/scd42-1.c: Likewise.

>>>          * gcc.target/arm/scd42-2.c: Likewise.

>>>          * gcc.target/arm/scd42-3.c: Likewise.

>>>          * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

>>>

>> Ok.

>>

>> This looks like a good improvement on its own.

>>

> Sigh, after more testing I found problems :(

>

>> Thanks,

>>

>> Kyrill

>>

>>

>>

>>> Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

>>>

>>> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

>>> b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

>>> index d144b70..4e695cd 100644

>>> --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

>>> +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

>>> @@ -1,4 +1,4 @@

>>> -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

>>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target

>>> arm*-*-* } } */

>>>   /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } {

>>> "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

>>>   /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" {

>>> target arm*-*-* } } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

>>> b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

>>> index 88528f1..886a012 100644

>>> --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

>>> +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6k" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

>>>   /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

>>>   /* { dg-add-options arm_arch_v6k } */

>>>

> For instance on arm-linux-gnueabihf (thus defaulting to float-abi=hard),

> arm_arch_v6k_thumb fails (because it tries to use thumb-1 + hard-float

> which is not supported),

> while the test itself would add -mfloat-abi=softfp, thus using a

> supported configuration.

>

> Is there a way to pass an argument to an effective-target directive?

> (current, if one adds an argument, it's the target selector)

>

> Or shall I add other effective-targets, eg arm_arch_v6k_thumb_softfp_ok?


Sigh, at this point I'm thinking maybe we should have a 
arm_arch_v6k_thumb target that basically assumes/forces softfp.

Thanks,

Kyrill


>

> Christophe

>

>>> diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

>>> b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

>>> index e1ed1c1..2eeb522 100644

>>> --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

>>> +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

>>> @@ -2,6 +2,7 @@

>>>      Verify that unaligned_access is correctly with attribute target.  */

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6" } } */

>>> +/* { dg-require-effective-target arm_arch_v6_ok } */

>>>   /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

>>>   /* { dg-add-options arm_arch_v6 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

>>> b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

>>> index 630c06a..d410056 100644

>>> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

>>> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

>>> @@ -2,6 +2,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-require-effective-target arm_arm_ok } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6-m" } } */

>>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>>>   /* { dg-add-options arm_arch_v6m } */

>>>

>>>   int __attribute__((target("arm")))

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

>>> index 4b48ef8..447a8ec 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv4" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v4_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v4 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

>>> index 016506f..05db533 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv4t" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v4t_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v4t } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

>>> index 9ef944e..78878f7 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv4t" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v4t } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

>>> index a9403e9..bea25d09 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv5t" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v5t_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v5t } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

>>> index f3ad07e..b25d17d 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv5t" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v5t } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

>>> index f98c01a..7b37c7f 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv5te" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v5te } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

>>> index 5d71787..27a64a2 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv5te" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v5te } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

>>> index 88a5089..bfab765 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v6 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

>>> index 90ef9d2..15a6d75 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v6 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

>>> index 8de021a..721c9f9 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6k" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6k_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v6k } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

>>> index c2fc270..b3b6ecf 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6k" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v6k } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

>>> index ee075e2..27f71be 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6-m" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v6m } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

>>> index 83b4bc4..259d2b5 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6t2" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v6t2 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

>>> index 1a1cbc5..e624ec5 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6t2" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v6t2 } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

>>> index e2df0d4..66380bf 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6z" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6z_ok } */

>>>   /* { dg-options "-marm" } */

>>>   /* { dg-add-options arm_arch_v6z } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

>>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

>>> index e4b94ef..23a4fcd 100644

>>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

>>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6z" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

>>>   /* { dg-options "-mthumb" } */

>>>   /* { dg-add-options arm_arch_v6z } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/g2.c

>>> b/gcc/testsuite/gcc.target/arm/g2.c

>>> index e368017..da68c8b 100644

>>> --- a/gcc/testsuite/gcc.target/arm/g2.c

>>> +++ b/gcc/testsuite/gcc.target/arm/g2.c

>>> @@ -4,6 +4,7 @@

>>>   /* { 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_ok } */

>>>   /* { dg-require-effective-target arm32 } */

>>>

>>>   /* Brett Gaines' test case. */

>>> diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c

>>> b/gcc/testsuite/gcc.target/arm/macro_defs1.c

>>> index 4cc9ae6..655ba93 100644

>>> --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

>>> +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-march=*" } { "-march=armv6-m" } } */

>>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

>>> "-marm" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

>>>   /* { dg-options "-march=armv6-m -mthumb" } */

>>>

>>>   #ifdef __ARM_NEON_FP

>>> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c

>>> b/gcc/testsuite/gcc.target/arm/pr59858.c

>>> index a944b9a..bcfd5d5 100644

>>> --- a/gcc/testsuite/gcc.target/arm/pr59858.c

>>> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

>>> @@ -1,6 +1,7 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb

>>> -fno-stack-protector -Os -fno-tree-loop-optimize

>>> -fno-tree-dominator-opts -fPIC -w" } */

>>>   /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft

>>> -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

>>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

>>>

>>>   typedef enum {

>>>    REG_ENOSYS = -1,

>>> diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c

>>> b/gcc/testsuite/gcc.target/arm/pr65647-2.c

>>> index f2985f8..3d9e75f 100644

>>> --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

>>> +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

>>> @@ -1,4 +1,5 @@

>>>   /* { dg-do compile } */

>>> +/* { dg-require-effective-target arm_arch_v6_ok } */

>>>   /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

>>>

>>>   typedef struct {

>>> diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c

>>> b/gcc/testsuite/gcc.target/arm/pr79058.c

>>> index 54a1d8a..7d078ac 100644

>>> --- a/gcc/testsuite/gcc.target/arm/pr79058.c

>>> +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

>>> @@ -1,5 +1,6 @@

>>>   /* { dg-do compile } */

>>>   /* { dg-require-effective-target arm_arm_ok } */

>>> +/* { dg-require-effective-target arm_arch_v4_ok } */

>>>   /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } {

>>> "-mcpu=arm7tdmi" } } */

>>>   /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c

>>> b/gcc/testsuite/gcc.target/arm/pr83712.c

>>> index 8ed8cdf..4902ec9 100644

>>> --- a/gcc/testsuite/gcc.target/arm/pr83712.c

>>> +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

>>> @@ -1,4 +1,5 @@

>>>   /* { dg-do compile } */

>>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

>>>   /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

>>>   #pragma GCC optimize ("-O2")

>>>

>>> diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

>>> b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

>>> index b6211f9..c3361e7 100644

>>> --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

>>> +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

>>> @@ -2,6 +2,7 @@

>>>   /* { dg-skip-if "instruction not valid on thumb" { *-*-* } {

>>> "-mthumb" } { "" } } */

>>>   /* { dg-do assemble } */

>>>   /* { dg-require-effective-target arm_arm_ok } */

>>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>>>   /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99

>>> -marm" } */

>>>

>>>   #pragma GCC target ("arch=armv6")

>>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c

>>> b/gcc/testsuite/gcc.target/arm/scd42-1.c

>>> index be60e64..2b8fc0b 100644

>>> --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

>>> +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

>>> @@ -3,6 +3,7 @@

>>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

>>> "-march=*" } { "-march=xscale" } } */

>>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

>>> } { "-mcpu=xscale" } } */

>>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

>>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

>>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

>>>

>>>   unsigned load1(void) __attribute__ ((naked));

>>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c

>>> b/gcc/testsuite/gcc.target/arm/scd42-2.c

>>> index 6d9e5e1..4181a75 100644

>>> --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

>>> +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

>>> @@ -4,6 +4,7 @@

>>>   /* { 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 arm32 } */

>>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>>>   /* { dg-options "-mcpu=xscale -O -marm" } */

>>>

>>>   unsigned load2(void) __attribute__ ((naked));

>>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c

>>> b/gcc/testsuite/gcc.target/arm/scd42-3.c

>>> index e566cb2..0afd121 100644

>>> --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

>>> +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

>>> @@ -3,6 +3,7 @@

>>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

>>> "-march=*" } { "-march=xscale" } } */

>>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

>>> } { "-mcpu=xscale" } } */

>>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

>>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

>>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

>>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

>>>

>>>   unsigned load4(void) __attribute__ ((naked));

>>> diff --git a/gcc/testsuite/lib/target-supports.exp

>>> b/gcc/testsuite/lib/target-supports.exp

>>> index 60d68f4..3f091c5 100644

>>> --- a/gcc/testsuite/lib/target-supports.exp

>>> +++ b/gcc/testsuite/lib/target-supports.exp

>>> @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

>>>   foreach { armfunc armflag armdefs } {

>>>           v4 "-march=armv4 -marm" __ARM_ARCH_4__

>>>           v4t "-march=armv4t" __ARM_ARCH_4T__

>>> +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

>>>           v5t "-march=armv5t" __ARM_ARCH_5T__

>>> +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

>>>           v5te "-march=armv5te" __ARM_ARCH_5TE__

>>> +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

>>>           v6 "-march=armv6" __ARM_ARCH_6__

>>> +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

>>>           v6k "-march=armv6k" __ARM_ARCH_6K__

>>> +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

>>>           v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

>>>           v6z "-march=armv6z" __ARM_ARCH_6Z__

>>> +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

>>>           v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

>>>           v7a "-march=armv7-a" __ARM_ARCH_7A__

>>>           v7r "-march=armv7-r" __ARM_ARCH_7R__

>>> --

>>> 2.6.3

>>>
Christophe Lyon Sept. 6, 2019, 9:09 a.m. UTC | #4
On Fri, 6 Sep 2019 at 10:28, Kyrill Tkachov <kyrylo.tkachov@foss.arm.com> wrote:
>

>

> On 9/6/19 9:01 AM, Christophe Lyon wrote:

> > On Fri, 19 Jul 2019 at 11:00, Kyrill Tkachov

> > <kyrylo.tkachov@foss.arm.com> wrote:

> >>

> >> On 5/15/19 1:39 PM, Christophe Lyon wrote:

> >>> Since FDPIC currently supports arm and thumb-2 modes only, these tests

> >>> fail because they enforce an architecture version that doesn't match

> >>> these restrictions.

> >>>

> >>> This patch introduces new values for the arm_arch effective-target

> >>> (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

> >>> needed, and adds them to the relevant tests.  It also adds the

> >>> corresponding non-thumb effective-target to the tests that were

> >>> missing it.

> >>>

> >>> 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

> >>>

> >>>          * lib/target-supports.exp

> >>>          (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

> >>>          v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

> >>>          * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

> >>>          effective-target.

> >>>          * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

> >>>          * gcc.target/arm/attr_arm-err.c: Likewise.

> >>>          * gcc.target/arm/ftest-armv4-arm.c: Likewise.

> >>>          * 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/g2.c: Likewise.

> >>>          * gcc.target/arm/macro_defs1.c: Likewise.

> >>>          * gcc.target/arm/pr59858.c: Likewise.

> >>>          * gcc.target/arm/pr65647-2.c: Likewise.

> >>>          * gcc.target/arm/pr79058.c: Likewise.

> >>>          * gcc.target/arm/pr83712.c: Likewise.

> >>>          * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

> >>>          * gcc.target/arm/scd42-1.c: Likewise.

> >>>          * gcc.target/arm/scd42-2.c: Likewise.

> >>>          * gcc.target/arm/scd42-3.c: Likewise.

> >>>          * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

> >>>

> >> Ok.

> >>

> >> This looks like a good improvement on its own.

> >>

> > Sigh, after more testing I found problems :(

> >

> >> Thanks,

> >>

> >> Kyrill

> >>

> >>

> >>

> >>> Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

> >>>

> >>> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> >>> b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> >>> index d144b70..4e695cd 100644

> >>> --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> >>> +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> >>> @@ -1,4 +1,4 @@

> >>> -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

> >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target

> >>> arm*-*-* } } */

> >>>   /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } {

> >>> "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

> >>>   /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" {

> >>> target arm*-*-* } } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> >>> b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> >>> index 88528f1..886a012 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6k" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> >>>   /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

> >>>   /* { dg-add-options arm_arch_v6k } */

> >>>

> > For instance on arm-linux-gnueabihf (thus defaulting to float-abi=hard),

> > arm_arch_v6k_thumb fails (because it tries to use thumb-1 + hard-float

> > which is not supported),

> > while the test itself would add -mfloat-abi=softfp, thus using a

> > supported configuration.

> >

> > Is there a way to pass an argument to an effective-target directive?

> > (current, if one adds an argument, it's the target selector)

> >

> > Or shall I add other effective-targets, eg arm_arch_v6k_thumb_softfp_ok?

>

> Sigh, at this point I'm thinking maybe we should have a

> arm_arch_v6k_thumb target that basically assumes/forces softfp.

>


Sure, I can add:
 +       v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__
instead of
 +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__
as the original patch does.

But isn't there a risk of conflict on toolchains configured for
hard-float or testcases enforcing it?
And... I suppose I should to the same for v4t_thumb, v5t_thumb,
v5te_thumb, v6_thumb and v6z_thumb?

I see that v6m/v8m_base already forces float-abi=soft....

Christophe



> Thanks,

>

> Kyrill

>

>

> >

> > Christophe

> >

> >>> diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> >>> b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> >>> index e1ed1c1..2eeb522 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> >>> @@ -2,6 +2,7 @@

> >>>      Verify that unaligned_access is correctly with attribute target.  */

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> >>>   /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

> >>>   /* { dg-add-options arm_arch_v6 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> >>> b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> >>> index 630c06a..d410056 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> >>> @@ -2,6 +2,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-require-effective-target arm_arm_ok } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6-m" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >>>   /* { dg-add-options arm_arch_v6m } */

> >>>

> >>>   int __attribute__((target("arm")))

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> >>> index 4b48ef8..447a8ec 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv4" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v4 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> >>> index 016506f..05db533 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv4t" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v4t_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v4t } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> >>> index 9ef944e..78878f7 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv4t" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v4t } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> >>> index a9403e9..bea25d09 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv5t" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5t_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v5t } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> >>> index f3ad07e..b25d17d 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv5t" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v5t } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> >>> index f98c01a..7b37c7f 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv5te" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v5te } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> >>> index 5d71787..27a64a2 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv5te" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v5te } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> >>> index 88a5089..bfab765 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v6 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> >>> index 90ef9d2..15a6d75 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v6 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> >>> index 8de021a..721c9f9 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6k" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6k_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v6k } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> >>> index c2fc270..b3b6ecf 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6k" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v6k } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> >>> index ee075e2..27f71be 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6-m" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v6m } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> >>> index 83b4bc4..259d2b5 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6t2" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v6t2 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> >>> index 1a1cbc5..e624ec5 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6t2" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v6t2 } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> >>> index e2df0d4..66380bf 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6z" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6z_ok } */

> >>>   /* { dg-options "-marm" } */

> >>>   /* { dg-add-options arm_arch_v6z } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> >>> index e4b94ef..23a4fcd 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6z" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

> >>>   /* { dg-options "-mthumb" } */

> >>>   /* { dg-add-options arm_arch_v6z } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/g2.c

> >>> b/gcc/testsuite/gcc.target/arm/g2.c

> >>> index e368017..da68c8b 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/g2.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/g2.c

> >>> @@ -4,6 +4,7 @@

> >>>   /* { 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_ok } */

> >>>   /* { dg-require-effective-target arm32 } */

> >>>

> >>>   /* Brett Gaines' test case. */

> >>> diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> >>> b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> >>> index 4cc9ae6..655ba93 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-march=*" } { "-march=armv6-m" } } */

> >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> >>> "-marm" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> >>>   /* { dg-options "-march=armv6-m -mthumb" } */

> >>>

> >>>   #ifdef __ARM_NEON_FP

> >>> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c

> >>> b/gcc/testsuite/gcc.target/arm/pr59858.c

> >>> index a944b9a..bcfd5d5 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/pr59858.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

> >>> @@ -1,6 +1,7 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb

> >>> -fno-stack-protector -Os -fno-tree-loop-optimize

> >>> -fno-tree-dominator-opts -fPIC -w" } */

> >>>   /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft

> >>> -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> >>>

> >>>   typedef enum {

> >>>    REG_ENOSYS = -1,

> >>> diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> >>> b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> >>> index f2985f8..3d9e75f 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> >>> @@ -1,4 +1,5 @@

> >>>   /* { dg-do compile } */

> >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> >>>   /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

> >>>

> >>>   typedef struct {

> >>> diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c

> >>> b/gcc/testsuite/gcc.target/arm/pr79058.c

> >>> index 54a1d8a..7d078ac 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/pr79058.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

> >>> @@ -1,5 +1,6 @@

> >>>   /* { dg-do compile } */

> >>>   /* { dg-require-effective-target arm_arm_ok } */

> >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> >>>   /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } {

> >>> "-mcpu=arm7tdmi" } } */

> >>>   /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c

> >>> b/gcc/testsuite/gcc.target/arm/pr83712.c

> >>> index 8ed8cdf..4902ec9 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/pr83712.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

> >>> @@ -1,4 +1,5 @@

> >>>   /* { dg-do compile } */

> >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> >>>   /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

> >>>   #pragma GCC optimize ("-O2")

> >>>

> >>> diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> >>> b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> >>> index b6211f9..c3361e7 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> >>> @@ -2,6 +2,7 @@

> >>>   /* { dg-skip-if "instruction not valid on thumb" { *-*-* } {

> >>> "-mthumb" } { "" } } */

> >>>   /* { dg-do assemble } */

> >>>   /* { dg-require-effective-target arm_arm_ok } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >>>   /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99

> >>> -marm" } */

> >>>

> >>>   #pragma GCC target ("arch=armv6")

> >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c

> >>> b/gcc/testsuite/gcc.target/arm/scd42-1.c

> >>> index be60e64..2b8fc0b 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

> >>> @@ -3,6 +3,7 @@

> >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> >>> "-march=*" } { "-march=xscale" } } */

> >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> >>> } { "-mcpu=xscale" } } */

> >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> >>>

> >>>   unsigned load1(void) __attribute__ ((naked));

> >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c

> >>> b/gcc/testsuite/gcc.target/arm/scd42-2.c

> >>> index 6d9e5e1..4181a75 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

> >>> @@ -4,6 +4,7 @@

> >>>   /* { 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 arm32 } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >>>   /* { dg-options "-mcpu=xscale -O -marm" } */

> >>>

> >>>   unsigned load2(void) __attribute__ ((naked));

> >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c

> >>> b/gcc/testsuite/gcc.target/arm/scd42-3.c

> >>> index e566cb2..0afd121 100644

> >>> --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

> >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

> >>> @@ -3,6 +3,7 @@

> >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> >>> "-march=*" } { "-march=xscale" } } */

> >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> >>> } { "-mcpu=xscale" } } */

> >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> >>>

> >>>   unsigned load4(void) __attribute__ ((naked));

> >>> diff --git a/gcc/testsuite/lib/target-supports.exp

> >>> b/gcc/testsuite/lib/target-supports.exp

> >>> index 60d68f4..3f091c5 100644

> >>> --- a/gcc/testsuite/lib/target-supports.exp

> >>> +++ b/gcc/testsuite/lib/target-supports.exp

> >>> @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

> >>>   foreach { armfunc armflag armdefs } {

> >>>           v4 "-march=armv4 -marm" __ARM_ARCH_4__

> >>>           v4t "-march=armv4t" __ARM_ARCH_4T__

> >>> +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

> >>>           v5t "-march=armv5t" __ARM_ARCH_5T__

> >>> +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

> >>>           v5te "-march=armv5te" __ARM_ARCH_5TE__

> >>> +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

> >>>           v6 "-march=armv6" __ARM_ARCH_6__

> >>> +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

> >>>           v6k "-march=armv6k" __ARM_ARCH_6K__

> >>> +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> >>>           v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

> >>>           v6z "-march=armv6z" __ARM_ARCH_6Z__

> >>> +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

> >>>           v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

> >>>           v7a "-march=armv7-a" __ARM_ARCH_7A__

> >>>           v7r "-march=armv7-r" __ARM_ARCH_7R__

> >>> --

> >>> 2.6.3

> >>>
Christophe Lyon Sept. 6, 2019, 5:43 p.m. UTC | #5
On Fri, 6 Sep 2019 at 11:09, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>

> On Fri, 6 Sep 2019 at 10:28, Kyrill Tkachov <kyrylo.tkachov@foss.arm.com> wrote:

> >

> >

> > On 9/6/19 9:01 AM, Christophe Lyon wrote:

> > > On Fri, 19 Jul 2019 at 11:00, Kyrill Tkachov

> > > <kyrylo.tkachov@foss.arm.com> wrote:

> > >>

> > >> On 5/15/19 1:39 PM, Christophe Lyon wrote:

> > >>> Since FDPIC currently supports arm and thumb-2 modes only, these tests

> > >>> fail because they enforce an architecture version that doesn't match

> > >>> these restrictions.

> > >>>

> > >>> This patch introduces new values for the arm_arch effective-target

> > >>> (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

> > >>> needed, and adds them to the relevant tests.  It also adds the

> > >>> corresponding non-thumb effective-target to the tests that were

> > >>> missing it.

> > >>>

> > >>> 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

> > >>>

> > >>>          * lib/target-supports.exp

> > >>>          (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

> > >>>          v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

> > >>>          * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

> > >>>          effective-target.

> > >>>          * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

> > >>>          * gcc.target/arm/attr_arm-err.c: Likewise.

> > >>>          * gcc.target/arm/ftest-armv4-arm.c: Likewise.

> > >>>          * 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/g2.c: Likewise.

> > >>>          * gcc.target/arm/macro_defs1.c: Likewise.

> > >>>          * gcc.target/arm/pr59858.c: Likewise.

> > >>>          * gcc.target/arm/pr65647-2.c: Likewise.

> > >>>          * gcc.target/arm/pr79058.c: Likewise.

> > >>>          * gcc.target/arm/pr83712.c: Likewise.

> > >>>          * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

> > >>>          * gcc.target/arm/scd42-1.c: Likewise.

> > >>>          * gcc.target/arm/scd42-2.c: Likewise.

> > >>>          * gcc.target/arm/scd42-3.c: Likewise.

> > >>>          * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

> > >>>

> > >> Ok.

> > >>

> > >> This looks like a good improvement on its own.

> > >>

> > > Sigh, after more testing I found problems :(

> > >

> > >> Thanks,

> > >>

> > >> Kyrill

> > >>

> > >>

> > >>

> > >>> Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > >>> b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > >>> index d144b70..4e695cd 100644

> > >>> --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > >>> +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > >>> @@ -1,4 +1,4 @@

> > >>> -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target

> > >>> arm*-*-* } } */

> > >>>   /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } {

> > >>> "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

> > >>>   /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" {

> > >>> target arm*-*-* } } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > >>> b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > >>> index 88528f1..886a012 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6k" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> > >>>   /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

> > >>>   /* { dg-add-options arm_arch_v6k } */

> > >>>

> > > For instance on arm-linux-gnueabihf (thus defaulting to float-abi=hard),

> > > arm_arch_v6k_thumb fails (because it tries to use thumb-1 + hard-float

> > > which is not supported),

> > > while the test itself would add -mfloat-abi=softfp, thus using a

> > > supported configuration.

> > >

> > > Is there a way to pass an argument to an effective-target directive?

> > > (current, if one adds an argument, it's the target selector)

> > >

> > > Or shall I add other effective-targets, eg arm_arch_v6k_thumb_softfp_ok?

> >

> > Sigh, at this point I'm thinking maybe we should have a

> > arm_arch_v6k_thumb target that basically assumes/forces softfp.

> >

>

> Sure, I can add:

>  +       v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__

> instead of

>  +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> as the original patch does.

>

> But isn't there a risk of conflict on toolchains configured for

> hard-float or testcases enforcing it?

> And... I suppose I should to the same for v4t_thumb, v5t_thumb,

> v5te_thumb, v6_thumb and v6z_thumb?

>

> I see that v6m/v8m_base already forces float-abi=soft....

>

> Christophe

>

>

How about the attached?
It forces -mfloat-abi=softfp on thumb arches that support thumb1 only,
and introduces _arm effective targets for those testcases which
actually force -marm.

Thanks

Christophe

>

> > Thanks,

> >

> > Kyrill

> >

> >

> > >

> > > Christophe

> > >

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > >>> b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > >>> index e1ed1c1..2eeb522 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > >>> @@ -2,6 +2,7 @@

> > >>>      Verify that unaligned_access is correctly with attribute target.  */

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > >>>   /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

> > >>>   /* { dg-add-options arm_arch_v6 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > >>> b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > >>> index 630c06a..d410056 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > >>> @@ -2,6 +2,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6-m" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > >>>   /* { dg-add-options arm_arch_v6m } */

> > >>>

> > >>>   int __attribute__((target("arm")))

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > >>> index 4b48ef8..447a8ec 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv4" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v4 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > >>> index 016506f..05db533 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv4t" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v4t_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v4t } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > >>> index 9ef944e..78878f7 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv4t" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v4t } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > >>> index a9403e9..bea25d09 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv5t" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5t_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v5t } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > >>> index f3ad07e..b25d17d 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv5t" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v5t } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > >>> index f98c01a..7b37c7f 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv5te" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v5te } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > >>> index 5d71787..27a64a2 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv5te" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v5te } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > >>> index 88a5089..bfab765 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v6 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > >>> index 90ef9d2..15a6d75 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v6 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > >>> index 8de021a..721c9f9 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6k" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6k_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v6k } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > >>> index c2fc270..b3b6ecf 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6k" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v6k } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > >>> index ee075e2..27f71be 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6-m" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v6m } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > >>> index 83b4bc4..259d2b5 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6t2" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v6t2 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > >>> index 1a1cbc5..e624ec5 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6t2" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v6t2 } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > >>> index e2df0d4..66380bf 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6z" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6z_ok } */

> > >>>   /* { dg-options "-marm" } */

> > >>>   /* { dg-add-options arm_arch_v6z } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > >>> index e4b94ef..23a4fcd 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6z" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

> > >>>   /* { dg-options "-mthumb" } */

> > >>>   /* { dg-add-options arm_arch_v6z } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/g2.c

> > >>> b/gcc/testsuite/gcc.target/arm/g2.c

> > >>> index e368017..da68c8b 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/g2.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/g2.c

> > >>> @@ -4,6 +4,7 @@

> > >>>   /* { 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_ok } */

> > >>>   /* { dg-require-effective-target arm32 } */

> > >>>

> > >>>   /* Brett Gaines' test case. */

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > >>> b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > >>> index 4cc9ae6..655ba93 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-march=*" } { "-march=armv6-m" } } */

> > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > >>> "-marm" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > >>>   /* { dg-options "-march=armv6-m -mthumb" } */

> > >>>

> > >>>   #ifdef __ARM_NEON_FP

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c

> > >>> b/gcc/testsuite/gcc.target/arm/pr59858.c

> > >>> index a944b9a..bcfd5d5 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/pr59858.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

> > >>> @@ -1,6 +1,7 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb

> > >>> -fno-stack-protector -Os -fno-tree-loop-optimize

> > >>> -fno-tree-dominator-opts -fPIC -w" } */

> > >>>   /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft

> > >>> -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> > >>>

> > >>>   typedef enum {

> > >>>    REG_ENOSYS = -1,

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > >>> b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > >>> index f2985f8..3d9e75f 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > >>> @@ -1,4 +1,5 @@

> > >>>   /* { dg-do compile } */

> > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > >>>   /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

> > >>>

> > >>>   typedef struct {

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c

> > >>> b/gcc/testsuite/gcc.target/arm/pr79058.c

> > >>> index 54a1d8a..7d078ac 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/pr79058.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

> > >>> @@ -1,5 +1,6 @@

> > >>>   /* { dg-do compile } */

> > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> > >>>   /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } {

> > >>> "-mcpu=arm7tdmi" } } */

> > >>>   /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c

> > >>> b/gcc/testsuite/gcc.target/arm/pr83712.c

> > >>> index 8ed8cdf..4902ec9 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/pr83712.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

> > >>> @@ -1,4 +1,5 @@

> > >>>   /* { dg-do compile } */

> > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> > >>>   /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

> > >>>   #pragma GCC optimize ("-O2")

> > >>>

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > >>> b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > >>> index b6211f9..c3361e7 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > >>> @@ -2,6 +2,7 @@

> > >>>   /* { dg-skip-if "instruction not valid on thumb" { *-*-* } {

> > >>> "-mthumb" } { "" } } */

> > >>>   /* { dg-do assemble } */

> > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > >>>   /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99

> > >>> -marm" } */

> > >>>

> > >>>   #pragma GCC target ("arch=armv6")

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > >>> b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > >>> index be60e64..2b8fc0b 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > >>> @@ -3,6 +3,7 @@

> > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > >>> "-march=*" } { "-march=xscale" } } */

> > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > >>> } { "-mcpu=xscale" } } */

> > >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> > >>>

> > >>>   unsigned load1(void) __attribute__ ((naked));

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > >>> b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > >>> index 6d9e5e1..4181a75 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > >>> @@ -4,6 +4,7 @@

> > >>>   /* { 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 arm32 } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > >>>   /* { dg-options "-mcpu=xscale -O -marm" } */

> > >>>

> > >>>   unsigned load2(void) __attribute__ ((naked));

> > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > >>> b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > >>> index e566cb2..0afd121 100644

> > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > >>> @@ -3,6 +3,7 @@

> > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > >>> "-march=*" } { "-march=xscale" } } */

> > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > >>> } { "-mcpu=xscale" } } */

> > >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> > >>>

> > >>>   unsigned load4(void) __attribute__ ((naked));

> > >>> diff --git a/gcc/testsuite/lib/target-supports.exp

> > >>> b/gcc/testsuite/lib/target-supports.exp

> > >>> index 60d68f4..3f091c5 100644

> > >>> --- a/gcc/testsuite/lib/target-supports.exp

> > >>> +++ b/gcc/testsuite/lib/target-supports.exp

> > >>> @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

> > >>>   foreach { armfunc armflag armdefs } {

> > >>>           v4 "-march=armv4 -marm" __ARM_ARCH_4__

> > >>>           v4t "-march=armv4t" __ARM_ARCH_4T__

> > >>> +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

> > >>>           v5t "-march=armv5t" __ARM_ARCH_5T__

> > >>> +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

> > >>>           v5te "-march=armv5te" __ARM_ARCH_5TE__

> > >>> +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

> > >>>           v6 "-march=armv6" __ARM_ARCH_6__

> > >>> +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

> > >>>           v6k "-march=armv6k" __ARM_ARCH_6K__

> > >>> +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> > >>>           v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

> > >>>           v6z "-march=armv6z" __ARM_ARCH_6Z__

> > >>> +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

> > >>>           v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

> > >>>           v7a "-march=armv7-a" __ARM_ARCH_7A__

> > >>>           v7r "-march=armv7-r" __ARM_ARCH_7R__

> > >>> --

> > >>> 2.6.3

> > >>>
Christophe Lyon Sept. 9, 2019, 8:38 a.m. UTC | #6
On Fri, 6 Sep 2019 at 19:43, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>

> On Fri, 6 Sep 2019 at 11:09, Christophe Lyon <christophe.lyon@linaro.org> wrote:

> >

> > On Fri, 6 Sep 2019 at 10:28, Kyrill Tkachov <kyrylo.tkachov@foss.arm.com> wrote:

> > >

> > >

> > > On 9/6/19 9:01 AM, Christophe Lyon wrote:

> > > > On Fri, 19 Jul 2019 at 11:00, Kyrill Tkachov

> > > > <kyrylo.tkachov@foss.arm.com> wrote:

> > > >>

> > > >> On 5/15/19 1:39 PM, Christophe Lyon wrote:

> > > >>> Since FDPIC currently supports arm and thumb-2 modes only, these tests

> > > >>> fail because they enforce an architecture version that doesn't match

> > > >>> these restrictions.

> > > >>>

> > > >>> This patch introduces new values for the arm_arch effective-target

> > > >>> (v4t_thumb, v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb) as

> > > >>> needed, and adds them to the relevant tests.  It also adds the

> > > >>> corresponding non-thumb effective-target to the tests that were

> > > >>> missing it.

> > > >>>

> > > >>> 2019-XX-XX  Christophe Lyon  <christophe.lyon@st.com>

> > > >>>

> > > >>>          * lib/target-supports.exp

> > > >>>          (check_effective_target_arm_arch_FUNC_ok): Add v4t_thumb,

> > > >>>          v5t_thumb, v5te_thumb, v6_thumb, v6k_thumb, v6z_thumb.

> > > >>>          * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch

> > > >>>          effective-target.

> > > >>>          * gcc.target/arm/attr-unaligned-load-ice.c: Likewise.

> > > >>>          * gcc.target/arm/attr_arm-err.c: Likewise.

> > > >>>          * gcc.target/arm/ftest-armv4-arm.c: Likewise.

> > > >>>          * 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/g2.c: Likewise.

> > > >>>          * gcc.target/arm/macro_defs1.c: Likewise.

> > > >>>          * gcc.target/arm/pr59858.c: Likewise.

> > > >>>          * gcc.target/arm/pr65647-2.c: Likewise.

> > > >>>          * gcc.target/arm/pr79058.c: Likewise.

> > > >>>          * gcc.target/arm/pr83712.c: Likewise.

> > > >>>          * gcc.target/arm/pragma_arch_switch_2.c: Likewise.

> > > >>>          * gcc.target/arm/scd42-1.c: Likewise.

> > > >>>          * gcc.target/arm/scd42-2.c: Likewise.

> > > >>>          * gcc.target/arm/scd42-3.c: Likewise.

> > > >>>          * gcc.c-torture/compile/pr82096.c: Fix arm_arch effective-target.

> > > >>>

> > > >> Ok.

> > > >>

> > > >> This looks like a good improvement on its own.

> > > >>

> > > > Sigh, after more testing I found problems :(

> > > >

> > > >> Thanks,

> > > >>

> > > >> Kyrill

> > > >>

> > > >>

> > > >>

> > > >>> Change-Id: I0845b262b241026561cc52a19ff8bb1659675e49

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > > >>> b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > > >>> index d144b70..4e695cd 100644

> > > >>> --- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > > >>> +++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c

> > > >>> @@ -1,4 +1,4 @@

> > > >>> -/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target

> > > >>> arm*-*-* } } */

> > > >>>   /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } {

> > > >>> "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */

> > > >>>   /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" {

> > > >>> target arm*-*-* } } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > > >>> b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > > >>> index 88528f1..886a012 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6k" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */

> > > >>>   /* { dg-add-options arm_arch_v6k } */

> > > >>>

> > > > For instance on arm-linux-gnueabihf (thus defaulting to float-abi=hard),

> > > > arm_arch_v6k_thumb fails (because it tries to use thumb-1 + hard-float

> > > > which is not supported),

> > > > while the test itself would add -mfloat-abi=softfp, thus using a

> > > > supported configuration.

> > > >

> > > > Is there a way to pass an argument to an effective-target directive?

> > > > (current, if one adds an argument, it's the target selector)

> > > >

> > > > Or shall I add other effective-targets, eg arm_arch_v6k_thumb_softfp_ok?

> > >

> > > Sigh, at this point I'm thinking maybe we should have a

> > > arm_arch_v6k_thumb target that basically assumes/forces softfp.

> > >

> >

> > Sure, I can add:

> >  +       v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__

> > instead of

> >  +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> > as the original patch does.

> >

> > But isn't there a risk of conflict on toolchains configured for

> > hard-float or testcases enforcing it?

> > And... I suppose I should to the same for v4t_thumb, v5t_thumb,

> > v5te_thumb, v6_thumb and v6z_thumb?

> >

> > I see that v6m/v8m_base already forces float-abi=soft....

> >

> > Christophe

> >

> >

> How about the attached?

> It forces -mfloat-abi=softfp on thumb arches that support thumb1 only,

> and introduces _arm effective targets for those testcases which

> actually force -marm.

>


Sorry for another iteration...
This updated update is a cleanup of the previous one:
- removes useless additions of -mfloat-abi in testcases since it's now
implied by the effective-targets
- fix effective target of di-longlong64-sync-withldrexd.c to avoid
skipping it when not needed
- removes the early check for the presence of -marm in the flags when
checking the effective targets arm_arch: checking if -marm alone is
supported does not work when GCC is configured to default to
M-profile, and all the arm_arch effective targets that include -marm
also include -march anyway, so that combination is supported even when
defaulting to M-profile.

Unfortunately, all of these recent changes are not really related to
FDPIC.... do you want me to try & split the patch?

Thanks,

Christophe

> Thanks

>

> Christophe

>

> >

> > > Thanks,

> > >

> > > Kyrill

> > >

> > >

> > > >

> > > > Christophe

> > > >

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > > >>> b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > > >>> index e1ed1c1..2eeb522 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c

> > > >>> @@ -2,6 +2,7 @@

> > > >>>      Verify that unaligned_access is correctly with attribute target.  */

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > > >>>   /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */

> > > >>>   /* { dg-add-options arm_arch_v6 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > > >>> b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > > >>> index 630c06a..d410056 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c

> > > >>> @@ -2,6 +2,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6-m" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > > >>>   /* { dg-add-options arm_arch_v6m } */

> > > >>>

> > > >>>   int __attribute__((target("arm")))

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > > >>> index 4b48ef8..447a8ec 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv4" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v4 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > > >>> index 016506f..05db533 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv4t" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v4t_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v4t } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > > >>> index 9ef944e..78878f7 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv4t" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v4t } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > > >>> index a9403e9..bea25d09 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv5t" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5t_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v5t } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > > >>> index f3ad07e..b25d17d 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv5t" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v5t } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > > >>> index f98c01a..7b37c7f 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv5te" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v5te } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > > >>> index 5d71787..27a64a2 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv5te" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v5te } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > > >>> index 88a5089..bfab765 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v6 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > > >>> index 90ef9d2..15a6d75 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v6 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > > >>> index 8de021a..721c9f9 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6k" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6k_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v6k } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > > >>> index c2fc270..b3b6ecf 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6k" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v6k } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > > >>> index ee075e2..27f71be 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6-m" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v6m } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > > >>> index 83b4bc4..259d2b5 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6t2" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v6t2 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > > >>> index 1a1cbc5..e624ec5 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6t2" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6t2_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v6t2 } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > > >>> index e2df0d4..66380bf 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6z" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6z_ok } */

> > > >>>   /* { dg-options "-marm" } */

> > > >>>   /* { dg-add-options arm_arch_v6z } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > > >>> b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > > >>> index e4b94ef..23a4fcd 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6z" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */

> > > >>>   /* { dg-options "-mthumb" } */

> > > >>>   /* { dg-add-options arm_arch_v6z } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/g2.c

> > > >>> b/gcc/testsuite/gcc.target/arm/g2.c

> > > >>> index e368017..da68c8b 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/g2.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/g2.c

> > > >>> @@ -4,6 +4,7 @@

> > > >>>   /* { 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_ok } */

> > > >>>   /* { dg-require-effective-target arm32 } */

> > > >>>

> > > >>>   /* Brett Gaines' test case. */

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > > >>> b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > > >>> index 4cc9ae6..655ba93 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-march=*" } { "-march=armv6-m" } } */

> > > >>>   /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } {

> > > >>> "-marm" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6m_ok } */

> > > >>>   /* { dg-options "-march=armv6-m -mthumb" } */

> > > >>>

> > > >>>   #ifdef __ARM_NEON_FP

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c

> > > >>> b/gcc/testsuite/gcc.target/arm/pr59858.c

> > > >>> index a944b9a..bcfd5d5 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/pr59858.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c

> > > >>> @@ -1,6 +1,7 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb

> > > >>> -fno-stack-protector -Os -fno-tree-loop-optimize

> > > >>> -fno-tree-dominator-opts -fPIC -w" } */

> > > >>>   /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft

> > > >>> -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */

> > > >>>

> > > >>>   typedef enum {

> > > >>>    REG_ENOSYS = -1,

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > > >>> b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > > >>> index f2985f8..3d9e75f 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c

> > > >>> @@ -1,4 +1,5 @@

> > > >>>   /* { dg-do compile } */

> > > >>> +/* { dg-require-effective-target arm_arch_v6_ok } */

> > > >>>   /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */

> > > >>>

> > > >>>   typedef struct {

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c

> > > >>> b/gcc/testsuite/gcc.target/arm/pr79058.c

> > > >>> index 54a1d8a..7d078ac 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/pr79058.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/pr79058.c

> > > >>> @@ -1,5 +1,6 @@

> > > >>>   /* { dg-do compile } */

> > > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > > >>> +/* { dg-require-effective-target arm_arch_v4_ok } */

> > > >>>   /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } {

> > > >>> "-mcpu=arm7tdmi" } } */

> > > >>>   /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c

> > > >>> b/gcc/testsuite/gcc.target/arm/pr83712.c

> > > >>> index 8ed8cdf..4902ec9 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/pr83712.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/pr83712.c

> > > >>> @@ -1,4 +1,5 @@

> > > >>>   /* { dg-do compile } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */

> > > >>>   /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */

> > > >>>   #pragma GCC optimize ("-O2")

> > > >>>

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > > >>> b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > > >>> index b6211f9..c3361e7 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c

> > > >>> @@ -2,6 +2,7 @@

> > > >>>   /* { dg-skip-if "instruction not valid on thumb" { *-*-* } {

> > > >>> "-mthumb" } { "" } } */

> > > >>>   /* { dg-do assemble } */

> > > >>>   /* { dg-require-effective-target arm_arm_ok } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > > >>>   /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99

> > > >>> -marm" } */

> > > >>>

> > > >>>   #pragma GCC target ("arch=armv6")

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > > >>> b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > > >>> index be60e64..2b8fc0b 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-1.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-1.c

> > > >>> @@ -3,6 +3,7 @@

> > > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > > >>> "-march=*" } { "-march=xscale" } } */

> > > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > > >>> } { "-mcpu=xscale" } } */

> > > >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > > >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > > >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> > > >>>

> > > >>>   unsigned load1(void) __attribute__ ((naked));

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > > >>> b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > > >>> index 6d9e5e1..4181a75 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-2.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c

> > > >>> @@ -4,6 +4,7 @@

> > > >>>   /* { 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 arm32 } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > > >>>   /* { dg-options "-mcpu=xscale -O -marm" } */

> > > >>>

> > > >>>   unsigned load2(void) __attribute__ ((naked));

> > > >>> diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > > >>> b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > > >>> index e566cb2..0afd121 100644

> > > >>> --- a/gcc/testsuite/gcc.target/arm/scd42-3.c

> > > >>> +++ b/gcc/testsuite/gcc.target/arm/scd42-3.c

> > > >>> @@ -3,6 +3,7 @@

> > > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {

> > > >>> "-march=*" } { "-march=xscale" } } */

> > > >>>   /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"

> > > >>> } { "-mcpu=xscale" } } */

> > > >>>   /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } {

> > > >>> "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */

> > > >>> +/* { dg-require-effective-target arm_arch_v5te_ok } */

> > > >>>   /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */

> > > >>>

> > > >>>   unsigned load4(void) __attribute__ ((naked));

> > > >>> diff --git a/gcc/testsuite/lib/target-supports.exp

> > > >>> b/gcc/testsuite/lib/target-supports.exp

> > > >>> index 60d68f4..3f091c5 100644

> > > >>> --- a/gcc/testsuite/lib/target-supports.exp

> > > >>> +++ b/gcc/testsuite/lib/target-supports.exp

> > > >>> @@ -4104,12 +4104,18 @@ proc check_effective_target_arm_fp16_hw { } {

> > > >>>   foreach { armfunc armflag armdefs } {

> > > >>>           v4 "-march=armv4 -marm" __ARM_ARCH_4__

> > > >>>           v4t "-march=armv4t" __ARM_ARCH_4T__

> > > >>> +       v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__

> > > >>>           v5t "-march=armv5t" __ARM_ARCH_5T__

> > > >>> +       v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__

> > > >>>           v5te "-march=armv5te" __ARM_ARCH_5TE__

> > > >>> +       v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__

> > > >>>           v6 "-march=armv6" __ARM_ARCH_6__

> > > >>> +       v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__

> > > >>>           v6k "-march=armv6k" __ARM_ARCH_6K__

> > > >>> +       v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__

> > > >>>           v6t2 "-march=armv6t2" __ARM_ARCH_6T2__

> > > >>>           v6z "-march=armv6z" __ARM_ARCH_6Z__

> > > >>> +       v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__

> > > >>>           v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__

> > > >>>           v7a "-march=armv7-a" __ARM_ARCH_7A__

> > > >>>           v7r "-march=armv7-r" __ARM_ARCH_7R__

> > > >>> --

> > > >>> 2.6.3

> > > >>>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82096.c b/gcc/testsuite/gcc.c-torture/compile/pr82096.c
index d144b70..4e695cd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr82096.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr82096.c
@@ -1,4 +1,4 @@ 
-/* { dg-require-effective-target arm_arch_v5t_ok { target arm*-*-* } } */
+/* { dg-require-effective-target arm_arch_v5t_thumb_ok { target arm*-*-* } } */
 /* { dg-skip-if "Do not combine float-abi values" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
 /* { dg-additional-options "-march=armv5t -mthumb -mfloat-abi=soft" { target arm*-*-* } } */
 
diff --git a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c
index 88528f1..886a012 100644
--- a/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c
+++ b/gcc/testsuite/gcc.target/arm/armv6-unaligned-load-ice.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */
 /* { dg-options "-mthumb -Os -mfloat-abi=softfp" } */
 /* { dg-add-options arm_arch_v6k } */
 
diff --git a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c
index e1ed1c1..2eeb522 100644
--- a/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c
+++ b/gcc/testsuite/gcc.target/arm/attr-unaligned-load-ice.c
@@ -2,6 +2,7 @@ 
    Verify that unaligned_access is correctly with attribute target.  */
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
 /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */
 /* { dg-add-options arm_arch_v6 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/attr_arm-err.c b/gcc/testsuite/gcc.target/arm/attr_arm-err.c
index 630c06a..d410056 100644
--- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c
+++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c
@@ -2,6 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_arm_ok } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
+/* { dg-require-effective-target arm_arch_v6m_ok } */
 /* { dg-add-options arm_arch_v6m } */
 
 int __attribute__((target("arm")))
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
index 4b48ef8..447a8ec 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v4_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
index 016506f..05db533 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v4t_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4t } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
index 9ef944e..78878f7 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v4t_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v4t } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
index a9403e9..bea25d09 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v5t_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5t } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
index f3ad07e..b25d17d 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5t } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
index f98c01a..7b37c7f 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5te } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
index 5d71787..27a64a2 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5te } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
index 88a5089..bfab765 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
index 90ef9d2..15a6d75 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
index 8de021a..721c9f9 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6k_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6k } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
index c2fc270..b3b6ecf 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6k_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6k } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
index ee075e2..27f71be 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6m_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6m } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
index 83b4bc4..259d2b5 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6t2_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
index 1a1cbc5..e624ec5 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6t2_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
index e2df0d4..66380bf 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6z_ok } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6z } */
 
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
index e4b94ef..23a4fcd 100644
--- a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6z_thumb_ok } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6z } */
 
diff --git a/gcc/testsuite/gcc.target/arm/g2.c b/gcc/testsuite/gcc.target/arm/g2.c
index e368017..da68c8b 100644
--- a/gcc/testsuite/gcc.target/arm/g2.c
+++ b/gcc/testsuite/gcc.target/arm/g2.c
@@ -4,6 +4,7 @@ 
 /* { 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_ok } */
 /* { dg-require-effective-target arm32 } */
 
 /* Brett Gaines' test case. */
diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c b/gcc/testsuite/gcc.target/arm/macro_defs1.c
index 4cc9ae6..655ba93 100644
--- a/gcc/testsuite/gcc.target/arm/macro_defs1.c
+++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-require-effective-target arm_arch_v6m_ok } */
 /* { dg-options "-march=armv6-m -mthumb" } */
 
 #ifdef __ARM_NEON_FP
diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c
index a944b9a..bcfd5d5 100644
--- a/gcc/testsuite/gcc.target/arm/pr59858.c
+++ b/gcc/testsuite/gcc.target/arm/pr59858.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb -fno-stack-protector -Os -fno-tree-loop-optimize -fno-tree-dominator-opts -fPIC -w" } */
 /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
+/* { dg-require-effective-target arm_arch_v5te_thumb_ok } */
 
 typedef enum {
  REG_ENOSYS = -1,
diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c b/gcc/testsuite/gcc.target/arm/pr65647-2.c
index f2985f8..3d9e75f 100644
--- a/gcc/testsuite/gcc.target/arm/pr65647-2.c
+++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
 /* { dg-options "-O3 -marm -march=armv6 -std=c99" } */
 
 typedef struct {
diff --git a/gcc/testsuite/gcc.target/arm/pr79058.c b/gcc/testsuite/gcc.target/arm/pr79058.c
index 54a1d8a..7d078ac 100644
--- a/gcc/testsuite/gcc.target/arm/pr79058.c
+++ b/gcc/testsuite/gcc.target/arm/pr79058.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_arm_ok } */
+/* { dg-require-effective-target arm_arch_v4_ok } */
 /* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "-mcpu=arm7tdmi" } } */
 /* { dg-options "-Os -mbig-endian -marm -mcpu=arm7tdmi" } */
 
diff --git a/gcc/testsuite/gcc.target/arm/pr83712.c b/gcc/testsuite/gcc.target/arm/pr83712.c
index 8ed8cdf..4902ec9 100644
--- a/gcc/testsuite/gcc.target/arm/pr83712.c
+++ b/gcc/testsuite/gcc.target/arm/pr83712.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v5t_thumb_ok } */
 /* { dg-options "-mfloat-abi=softfp -mthumb -march=armv5t -O2" }  */
 #pragma GCC optimize ("-O2")
 
diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
index b6211f9..c3361e7 100644
--- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
+++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
@@ -2,6 +2,7 @@ 
 /* { dg-skip-if "instruction not valid on thumb" { *-*-* } { "-mthumb" } { "" } } */
 /* { dg-do assemble } */
 /* { dg-require-effective-target arm_arm_ok } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
 /* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99 -marm" } */
 
 #pragma GCC target ("arch=armv6")
diff --git a/gcc/testsuite/gcc.target/arm/scd42-1.c b/gcc/testsuite/gcc.target/arm/scd42-1.c
index be60e64..2b8fc0b 100644
--- a/gcc/testsuite/gcc.target/arm/scd42-1.c
+++ b/gcc/testsuite/gcc.target/arm/scd42-1.c
@@ -3,6 +3,7 @@ 
 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
 /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */
 
 unsigned load1(void) __attribute__ ((naked));
diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c b/gcc/testsuite/gcc.target/arm/scd42-2.c
index 6d9e5e1..4181a75 100644
--- a/gcc/testsuite/gcc.target/arm/scd42-2.c
+++ b/gcc/testsuite/gcc.target/arm/scd42-2.c
@@ -4,6 +4,7 @@ 
 /* { 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 arm32 } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
 /* { dg-options "-mcpu=xscale -O -marm" } */
 
 unsigned load2(void) __attribute__ ((naked));
diff --git a/gcc/testsuite/gcc.target/arm/scd42-3.c b/gcc/testsuite/gcc.target/arm/scd42-3.c
index e566cb2..0afd121 100644
--- a/gcc/testsuite/gcc.target/arm/scd42-3.c
+++ b/gcc/testsuite/gcc.target/arm/scd42-3.c
@@ -3,6 +3,7 @@ 
 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
 /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */
 
 unsigned load4(void) __attribute__ ((naked));
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 60d68f4..3f091c5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4104,12 +4104,18 @@  proc check_effective_target_arm_fp16_hw { } {
 foreach { armfunc armflag armdefs } {
 	v4 "-march=armv4 -marm" __ARM_ARCH_4__
 	v4t "-march=armv4t" __ARM_ARCH_4T__
+	v4t_thumb "-march=armv4t -mthumb" __ARM_ARCH_4T__
 	v5t "-march=armv5t" __ARM_ARCH_5T__
+	v5t_thumb "-march=armv5t -mthumb" __ARM_ARCH_5T__
 	v5te "-march=armv5te" __ARM_ARCH_5TE__
+	v5te_thumb "-march=armv5te -mthumb" __ARM_ARCH_5TE__
 	v6 "-march=armv6" __ARM_ARCH_6__
+	v6_thumb "-march=armv6 -mthumb" __ARM_ARCH_6__
 	v6k "-march=armv6k" __ARM_ARCH_6K__
+	v6k_thumb "-march=armv6k -mthumb" __ARM_ARCH_6K__
 	v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
 	v6z "-march=armv6z" __ARM_ARCH_6Z__
+	v6z_thumb "-march=armv6z -mthumb" __ARM_ARCH_6Z__
 	v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__
 	v7a "-march=armv7-a" __ARM_ARCH_7A__
 	v7r "-march=armv7-r" __ARM_ARCH_7R__