[ARM/FDPIC v6 00/24] FDPIC ABI for ARM

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[ARM/FDPIC v6 20/24] [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC

Christophe Lyon
From: Christophe Lyon <[hidden email]>

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.  In addition, it adds
v4t_arm, v5t_arm, v5te_arm, v6_arm, v6k_arm and v6z_arm to avoid
skipping some tests when GCC is configured to generate Thumb code by
default.

It also adds the corresponding non-thumb effective-target to the tests
that were missing it.

The existing v4t, v5t, v5te, v6 v6k and v6z effective-targets now force
-mfloat-abi=softfp since these thumb-1 targets do not support
hard-float anyway.

Finally, the patch removes the special case to detect the presence of
-marm in the flags, since it makes atomic_loaddi tests unsupported:
since the flags in question also include -march, the combination is
supported, while -marm alone is not if GCC is configured to target an
M-profile CPU.

2019-XX-XX  Christophe Lyon  <[hidden email]>

        gcc/testsuite/
        * lib/target-supports.exp
        (check_effective_target_arm_arch_FUNC_ok): Add v4t_arm, v4t_thumb,
        v5t_arm, v5t_thumb, v5te_arm, v5te_thumb, v6_arm, v6_thumb,
        v6k_arm, v6k_thumb, v6z_arm, v6z_thumb.
        Add -mfloat-abi=softfp to v4t, v5t, v5te, v6, v6k, v6z.
        Remove early exit for -marm.
        * 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/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.
        * gcc.target/arm/attr_arm-err.c: Likewise.
        * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.

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..67d572a 100644
--- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c
+++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c
@@ -1,7 +1,7 @@
 /* Check that attribute target arm is rejected for M profile.  */
 /* { 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/di-longlong64-sync-withldrexd.c b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
index 517c4a8..befb7ec 100644
--- a/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
+++ b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
@@ -1,7 +1,6 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_arm_ok } */
 /* { dg-options "-marm -std=gnu99" } */
-/* { dg-require-effective-target arm_arch_v6k_ok } */
+/* { dg-require-effective-target arm_arch_v6k_arm_ok } */
 /* { dg-add-options arm_arch_v6k } */
 /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */
 /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "nand_and_fetch" { target *-*-* } 0 } */
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..28fd2f7 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_arm_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..8191299 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_arm_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..e0c0d5c 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_arm_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..5d447c3 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_arm_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..0656e8f 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_arm_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..6e3a966 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_arm_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..ca5e3cc 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_arm_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..e3978e5 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_arm_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..5080d2c 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_arm_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..3c9768d 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_arm_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 0b67e10..1a1eed8 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4181,13 +4181,25 @@ proc check_effective_target_arm_fp16_hw { } {
 # /* { dg-require-effective-target arm_arch_v5t_multilib } */
 foreach { armfunc armflag armdefs } {
  v4 "-march=armv4 -marm" __ARM_ARCH_4__
- v4t "-march=armv4t" __ARM_ARCH_4T__
- v5t "-march=armv5t" __ARM_ARCH_5T__
- v5te "-march=armv5te" __ARM_ARCH_5TE__
- v6 "-march=armv6" __ARM_ARCH_6__
- v6k "-march=armv6k" __ARM_ARCH_6K__
+ v4t "-march=armv4t -mfloat-abi=softfp" __ARM_ARCH_4T__
+ v4t_arm "-march=armv4t -marm" __ARM_ARCH_4T__
+ v4t_thumb "-march=armv4t -mthumb -mfloat-abi=softfp" __ARM_ARCH_4T__
+ v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__
+ v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__
+ v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp" __ARM_ARCH_5T__
+ v5te "-march=armv5te -mfloat-abi=softfp" __ARM_ARCH_5TE__
+ v5te_arm "-march=armv5te -marm" __ARM_ARCH_5TE__
+ v5te_thumb "-march=armv5te -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__
+ v6 "-march=armv6 -mfloat-abi=softfp" __ARM_ARCH_6__
+ v6_arm "-march=armv6 -marm" __ARM_ARCH_6__
+ v6_thumb "-march=armv6 -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__
+ v6k "-march=armv6k -mfloat-abi=softfp" __ARM_ARCH_6K__
+ v6k_arm "-march=armv6k -marm" __ARM_ARCH_6K__
+ v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__
  v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
- v6z "-march=armv6z" __ARM_ARCH_6Z__
+ v6z "-march=armv6z -mfloat-abi=softfp" __ARM_ARCH_6Z__
+ v6z_arm "-march=armv6z -marm" __ARM_ARCH_6Z__
+ v6z_thumb "-march=armv6z -mthumb -mfloat-abi=softfp" __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__
@@ -4204,10 +4216,6 @@ foreach { armfunc armflag armdefs } {
  v8r "-march=armv8-r" __ARM_ARCH_8R__ } {
     eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
  proc check_effective_target_arm_arch_FUNC_ok { } {
-    if { [ string match "*-marm*" "FLAG" ] &&
- ![check_effective_target_arm_arm_ok] } {
- return 0
-    }
     return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
  #if !(DEFS)
  #error !(DEFS)
--
2.6.3

Reply | Threaded
Open this post in threaded view
|

[ARM/FDPIC v6 21/24] [ARM] FDPIC: Handle stack-protector combined patterns

Christophe Lyon
In reply to this post by Christophe Lyon
From: Christophe Lyon <[hidden email]>

The recent stack_protect_combined_set_insn and
stack_protect_combined_test_insn force recomputing of GOT base, but
need to take into account that in FDPIC mode, the PIC register is
fixed by the ABI (r9).

2019-XX-XX  Christophe Lyon  <[hidden email]>

        gcc/
        * config/arm/arm.md (stack_protect_combined_set_insn): Handle
        FDPIC mode.
        (stack_protect_combined_test_insn): Likewise.

Change-Id: I0e47cf30cfe0dc401f43bd728aaae07bffa4c9cc

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 918271d..6513c2d 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8270,8 +8270,15 @@
 {
   if (flag_pic)
     {
+      rtx pic_reg;
+
+      if (TARGET_FDPIC)
+  pic_reg = gen_rtx_REG (Pmode, FDPIC_REGNUM);
+      else
+  pic_reg = operands[3];
+
       /* Forces recomputing of GOT base now.  */
-      legitimize_pic_address (operands[1], SImode, operands[2], operands[3],
+      legitimize_pic_address (operands[1], SImode, operands[2], pic_reg,
       true /*compute_now*/);
     }
   else
@@ -8346,8 +8353,15 @@
 
   if (flag_pic)
     {
+      rtx pic_reg;
+
+      if (TARGET_FDPIC)
+  pic_reg = gen_rtx_REG (Pmode, FDPIC_REGNUM);
+      else
+  pic_reg = operands[4];
+
       /* Forces recomputing of GOT base now.  */
-      legitimize_pic_address (operands[1], SImode, operands[3], operands[4],
+      legitimize_pic_address (operands[1], SImode, operands[3], pic_reg,
       true /*compute_now*/);
     }
   else
--
2.6.3

Reply | Threaded
Open this post in threaded view
|

[ARM/FDPIC v6 22/24] [ARM][testsuite] FDPIC: Skip tests that require -static support

Christophe Lyon
In reply to this post by Christophe Lyon
From: Christophe Lyon <[hidden email]>

Since FDPIC does not support -static, skip the related tests.

2019-XX-XX  Christophe Lyon  <[hidden email]>

        gcc/testsuite/
        * lib/target-supports.exp (check_effective_target_static): Disable
        for ARM FDPIC target.

Change-Id: I119d0541e53f2f1e531540b20e7bc47d8338d89a

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 1a1eed8..19899ce 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1083,6 +1083,9 @@ proc check_effective_target_pe_aligned_commons {} {
 
 # Return 1 if the target supports -static
 proc check_effective_target_static {} {
+    if { [istarget arm*-*-uclinuxfdpiceabi] } {
+ return 0;
+    }
     return [check_no_compiler_messages static executable {
  int main (void) { return 0; }
     } "-static"]
--
2.6.3

Reply | Threaded
Open this post in threaded view
|

[ARM/FDPIC v6 23/24] [ARM] FDPIC: Implement libitm support.

Christophe Lyon
In reply to this post by Christophe Lyon
From: Christophe Lyon <[hidden email]>

The ldaddr macro in sjlj.S needs to be updated to support the FDPIC
model.

2019-XX-XX  Christophe Lyon  <[hidden email]>

        libitm/
        * config/arm/sjlj.S (ldaddr): Add FDPIC support.

Change-Id: Ieb2c6613363341d109c3500af0575b133b17407d

diff --git a/libitm/config/arm/sjlj.S b/libitm/config/arm/sjlj.S
index a9abf16..5d44964 100644
--- a/libitm/config/arm/sjlj.S
+++ b/libitm/config/arm/sjlj.S
@@ -49,7 +49,16 @@
  .arch armv7-m
 #endif
 
-#if defined(HAVE_MOVT) && defined(PIC)
+#if defined(__FDPIC__)
+.macro ldaddr reg, addr
+ ldr \reg, 99f
+ add \reg, \reg, r9
+.subsection 1
+ .align 2
+99: .word \addr(GOTOFF)
+.subsection 0
+.endm
+#elif defined(HAVE_MOVT) && defined(PIC)
 .macro ldaddr reg, addr
  movw \reg, #:lower16:(\addr - (98f + PC_OFS))
  movt \reg, #:upper16:(\addr - (98f + PC_OFS))
--
2.6.3

Reply | Threaded
Open this post in threaded view
|

[ARM/FDPIC v6 24/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in libstdc++ configure scripts

Christophe Lyon
In reply to this post by Christophe Lyon
From: Christophe Lyon <[hidden email]>

2019-XX-XX  Christophe Lyon  <[hidden email]>

        libstdc++-v3/
    * acinclude.m4: Handle uclinux*.
    * configure: Regenerate.
    * configure.host: Handle uclinux*

Change-Id: Ia1b53693625e4153a090fcfc925a4d605bc98e59

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index bc9095f..ad2cb01 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1441,6 +1441,9 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;
+      uclinux*)
+        ac_has_nanosleep=yes
+        ac_has_sched_yield=yes
     esac
 
   elif test x"$enable_libstdcxx_time" != x"no"; then
@@ -1526,7 +1529,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
 
   if test x"$ac_has_clock_monotonic" != x"yes"; then
     case ${target_os} in
-      linux*)
+      linux* | uclinux*)
  AC_MSG_CHECKING([for clock_gettime syscall])
  AC_TRY_COMPILE(
   [#include <unistd.h>
@@ -4424,7 +4427,7 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [
       freebsd*|netbsd*|openbsd*|dragonfly*|darwin*)
         enable_libstdcxx_filesystem_ts=yes
         ;;
-      gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+      gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu | uclinux*)
         enable_libstdcxx_filesystem_ts=yes
         ;;
       rtems*)
@@ -4606,7 +4609,7 @@ dnl
     AC_MSG_CHECKING([for sendfile that can copy files])
     AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl
       case "${target_os}" in
-        gnu* | linux* | solaris*)
+        gnu* | linux* | solaris* | uclinux*)
           GCC_TRY_COMPILE_OR_LINK(
             [#include <sys/sendfile.h>],
             [sendfile(1, 2, (off_t*)0, sizeof 1);],
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 4e714e5..c63789c 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -6652,7 +6652,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -9598,7 +9598,7 @@ _LT_EOF
       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
  case $cc_basename in
@@ -11138,7 +11138,12 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+
+# uclinux* changes (here and below) have been submitted to the libtool
+# project, but have not yet been accepted: they are GCC-local changes
+# for the time being.  (See
+# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -14822,7 +14827,12 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+
+# uclinux* changes (here and below) have been submitted to the libtool
+# project, but have not yet been accepted: they are GCC-local changes
+# for the time being.  (See
+# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20899,6 +20909,9 @@ $as_echo "$glibcxx_glibc217" >&6; }
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;
+      uclinux*)
+        ac_has_nanosleep=yes
+        ac_has_sched_yield=yes
     esac
 
   elif test x"$enable_libstdcxx_time" != x"no"; then
@@ -21347,7 +21360,7 @@ $as_echo "$ac_has_nanosleep" >&6; }
 
   if test x"$ac_has_clock_monotonic" != x"yes"; then
     case ${target_os} in
-      linux*)
+      linux* | uclinux*)
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5
 $as_echo_n "checking for clock_gettime syscall... " >&6; }
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28316,7 +28329,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   chktls_save_LDFLAGS="$LDFLAGS"
       case $host in
-    *-*-linux*)
+    *-*-linux* | -*-uclinuxfdpic*)
       LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
       ;;
   esac
@@ -47824,7 +47837,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   chktls_save_LDFLAGS="$LDFLAGS"
       case $host in
-    *-*-linux*)
+    *-*-linux* | -*-uclinuxfdpic*)
       LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
       ;;
   esac
@@ -54011,7 +54024,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   chktls_save_LDFLAGS="$LDFLAGS"
       case $host in
-    *-*-linux*)
+    *-*-linux* | -*-uclinuxfdpic*)
       LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
       ;;
   esac
@@ -72654,7 +72667,7 @@ fi
 
 
 case "$target" in
-  *-linux*)
+  *-linux* | *-uclinux*)
     case "$enable_linux_futex" in
       default)
  # If headers don't have gettid/futex syscalls definition, then
@@ -74326,7 +74339,7 @@ $as_echo_n "checking whether to build Filesystem TS support... " >&6; }
       freebsd*|netbsd*|openbsd*|dragonfly*|darwin*)
         enable_libstdcxx_filesystem_ts=yes
         ;;
-      gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+      gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu | uclinux*)
         enable_libstdcxx_filesystem_ts=yes
         ;;
       rtems*)
@@ -74878,7 +74891,7 @@ $as_echo_n "checking for sendfile that can copy files... " >&6; }
   $as_echo_n "(cached) " >&6
 else
         case "${target_os}" in
-        gnu* | linux* | solaris*)
+        gnu* | linux* | solaris* | uclinux*)
           if test x$gcc_no_link = xyes; then
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index 57e1c50..898db37 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -264,7 +264,7 @@ case "${host_os}" in
   linux-musl*)
     os_include_dir="os/generic"
     ;;
-  gnu* | linux* | kfreebsd*-gnu)
+  gnu* | linux* | kfreebsd*-gnu | uclinux*)
     if [ "$uclibc" = "yes" ]; then
       os_include_dir="os/uclibc"
     elif [ "$bionic" = "yes" ]; then
@@ -321,7 +321,7 @@ esac
 # Set any OS-dependent and CPU-dependent bits.
 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
 case "${host}" in
-  *-*-linux*)
+  *-*-linux* | *-*-uclinux*)
     case "${host_cpu}" in
       i[567]86)
         abi_baseline_pair=i486-linux-gnu
@@ -355,7 +355,7 @@ case "${host}" in
         fi
     esac
     case "${host}" in
-      arm*-*-linux-*)
+      arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
  port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
  ;;
     esac
--
2.6.3

Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 20/24] [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC

Christophe Lyon-2
In reply to this post by Christophe Lyon
Hi Kyrill,

I didn't commit this patch yet: are you OK with it?

Thanks,

Christophe

On Mon, 9 Sep 2019 at 17:52, Christophe Lyon <[hidden email]> wrote:

> From: Christophe Lyon <[hidden email]>
>
> 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.  In addition, it adds
> v4t_arm, v5t_arm, v5te_arm, v6_arm, v6k_arm and v6z_arm to avoid
> skipping some tests when GCC is configured to generate Thumb code by
> default.
>
> It also adds the corresponding non-thumb effective-target to the tests
> that were missing it.
>
> The existing v4t, v5t, v5te, v6 v6k and v6z effective-targets now force
> -mfloat-abi=softfp since these thumb-1 targets do not support
> hard-float anyway.
>
> Finally, the patch removes the special case to detect the presence of
> -marm in the flags, since it makes atomic_loaddi tests unsupported:
> since the flags in question also include -march, the combination is
> supported, while -marm alone is not if GCC is configured to target an
> M-profile CPU.
>
> 2019-XX-XX  Christophe Lyon  <[hidden email]>
>
>         gcc/testsuite/
>         * lib/target-supports.exp
>         (check_effective_target_arm_arch_FUNC_ok): Add v4t_arm, v4t_thumb,
>         v5t_arm, v5t_thumb, v5te_arm, v5te_thumb, v6_arm, v6_thumb,
>         v6k_arm, v6k_thumb, v6z_arm, v6z_thumb.
>         Add -mfloat-abi=softfp to v4t, v5t, v5te, v6, v6k, v6z.
>         Remove early exit for -marm.
>         * 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/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.
>         * gcc.target/arm/attr_arm-err.c: Likewise.
>         * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.
>
> 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..67d572a 100644
> --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c
> +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c
> @@ -1,7 +1,7 @@
>  /* Check that attribute target arm is rejected for M profile.  */
>  /* { 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/di-longlong64-sync-withldrexd.c
> b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
> index 517c4a8..befb7ec 100644
> --- a/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
> +++ b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
> @@ -1,7 +1,6 @@
>  /* { dg-do compile } */
> -/* { dg-require-effective-target arm_arm_ok } */
>  /* { dg-options "-marm -std=gnu99" } */
> -/* { dg-require-effective-target arm_arch_v6k_ok } */
> +/* { dg-require-effective-target arm_arch_v6k_arm_ok } */
>  /* { dg-add-options arm_arch_v6k } */
>  /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC
> 4.4" "fetch_and_nand" { target *-*-* } 0 } */
>  /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC
> 4.4" "nand_and_fetch" { target *-*-* } 0 } */
> 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..28fd2f7 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_arm_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..8191299 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_arm_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..e0c0d5c 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_arm_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..5d447c3 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_arm_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..0656e8f 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_arm_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..6e3a966 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_arm_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..ca5e3cc 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_arm_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..e3978e5 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_arm_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..5080d2c 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_arm_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..3c9768d 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_arm_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 0b67e10..1a1eed8 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -4181,13 +4181,25 @@ proc check_effective_target_arm_fp16_hw { } {
>  #       /* { dg-require-effective-target arm_arch_v5t_multilib } */
>  foreach { armfunc armflag armdefs } {
>         v4 "-march=armv4 -marm" __ARM_ARCH_4__
> -       v4t "-march=armv4t" __ARM_ARCH_4T__
> -       v5t "-march=armv5t" __ARM_ARCH_5T__
> -       v5te "-march=armv5te" __ARM_ARCH_5TE__
> -       v6 "-march=armv6" __ARM_ARCH_6__
> -       v6k "-march=armv6k" __ARM_ARCH_6K__
> +       v4t "-march=armv4t -mfloat-abi=softfp" __ARM_ARCH_4T__
> +       v4t_arm "-march=armv4t -marm" __ARM_ARCH_4T__
> +       v4t_thumb "-march=armv4t -mthumb -mfloat-abi=softfp"
> __ARM_ARCH_4T__
> +       v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__
> +       v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__
> +       v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp"
> __ARM_ARCH_5T__
> +       v5te "-march=armv5te -mfloat-abi=softfp" __ARM_ARCH_5TE__
> +       v5te_arm "-march=armv5te -marm" __ARM_ARCH_5TE__
> +       v5te_thumb "-march=armv5te -mthumb -mfloat-abi=softfp"
> __ARM_ARCH_5TE__
> +       v6 "-march=armv6 -mfloat-abi=softfp" __ARM_ARCH_6__
> +       v6_arm "-march=armv6 -marm" __ARM_ARCH_6__
> +       v6_thumb "-march=armv6 -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__
> +       v6k "-march=armv6k -mfloat-abi=softfp" __ARM_ARCH_6K__
> +       v6k_arm "-march=armv6k -marm" __ARM_ARCH_6K__
> +       v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp"
> __ARM_ARCH_6K__
>         v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
> -       v6z "-march=armv6z" __ARM_ARCH_6Z__
> +       v6z "-march=armv6z -mfloat-abi=softfp" __ARM_ARCH_6Z__
> +       v6z_arm "-march=armv6z -marm" __ARM_ARCH_6Z__
> +       v6z_thumb "-march=armv6z -mthumb -mfloat-abi=softfp"
> __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__
> @@ -4204,10 +4216,6 @@ foreach { armfunc armflag armdefs } {
>         v8r "-march=armv8-r" __ARM_ARCH_8R__ } {
>      eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
>         proc check_effective_target_arm_arch_FUNC_ok { } {
> -           if { [ string match "*-marm*" "FLAG" ] &&
> -               ![check_effective_target_arm_arm_ok] } {
> -               return 0
> -           }
>             return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
>                 #if !(DEFS)
>                 #error !(DEFS)
> --
> 2.6.3
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 20/24] [ARM][testsuite] FDPIC: Skip tests using architectures unsupported by FDPIC

Kyrill Tkachov-2
Hi Christophe,

On 9/16/19 1:31 PM, Christophe Lyon wrote:

> Hi Kyrill,
>
> I didn't commit this patch yet: are you OK with it?
>
> Thanks,
>
> Christophe
>
> On Mon, 9 Sep 2019 at 17:52, Christophe Lyon <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     From: Christophe Lyon <[hidden email]
>     <mailto:[hidden email]>>
>
>     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.  In addition, it adds
>     v4t_arm, v5t_arm, v5te_arm, v6_arm, v6k_arm and v6z_arm to avoid
>     skipping some tests when GCC is configured to generate Thumb code by
>     default.
>
>     It also adds the corresponding non-thumb effective-target to the tests
>     that were missing it.
>
>     The existing v4t, v5t, v5te, v6 v6k and v6z effective-targets now
>     force
>     -mfloat-abi=softfp since these thumb-1 targets do not support
>     hard-float anyway.
>
>     Finally, the patch removes the special case to detect the presence of
>     -marm in the flags, since it makes atomic_loaddi tests unsupported:
>     since the flags in question also include -march, the combination is
>     supported, while -marm alone is not if GCC is configured to target an
>     M-profile CPU.
>
>     2019-XX-XX  Christophe Lyon  <[hidden email]
>     <mailto:[hidden email]>>
>
>             gcc/testsuite/
>             * lib/target-supports.exp
>             (check_effective_target_arm_arch_FUNC_ok): Add v4t_arm,
>     v4t_thumb,
>             v5t_arm, v5t_thumb, v5te_arm, v5te_thumb, v6_arm, v6_thumb,
>             v6k_arm, v6k_thumb, v6z_arm, v6z_thumb.
>             Add -mfloat-abi=softfp to v4t, v5t, v5te, v6, v6k, v6z.
>             Remove early exit for -marm.
>             * 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/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.
>             * gcc.target/arm/attr_arm-err.c: Likewise.
>             * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.
>

Thanks. This is ok for trunk.

Sorry for the delay, I was away for Cauldron all of last week.

Thank you for your patience with the whole patch series!

Glad to have it in.

Can you please prepare an entry for the GCC 10 changes.html page when
you get a chance?

I think the web pages will be moving to git soon...

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..67d572a 100644
>     --- a/gcc/testsuite/gcc.target/arm/attr_arm-err.c
>     +++ b/gcc/testsuite/gcc.target/arm/attr_arm-err.c
>     @@ -1,7 +1,7 @@
>      /* Check that attribute target arm is rejected for M profile.  */
>      /* { 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/di-longlong64-sync-withldrexd.c
>     b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
>     index 517c4a8..befb7ec 100644
>     --- a/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
>     +++ b/gcc/testsuite/gcc.target/arm/di-longlong64-sync-withldrexd.c
>     @@ -1,7 +1,6 @@
>      /* { dg-do compile } */
>     -/* { dg-require-effective-target arm_arm_ok } */
>      /* { dg-options "-marm -std=gnu99" } */
>     -/* { dg-require-effective-target arm_arch_v6k_ok } */
>     +/* { dg-require-effective-target arm_arch_v6k_arm_ok } */
>      /* { dg-add-options arm_arch_v6k } */
>      /* { dg-message "note: '__sync_fetch_and_nand' changed semantics
>     in GCC 4.4" "fetch_and_nand" { target *-*-* } 0 } */
>      /* { dg-message "note: '__sync_nand_and_fetch' changed semantics
>     in GCC 4.4" "nand_and_fetch" { target *-*-* } 0 } */
>     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..28fd2f7 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_arm_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..8191299 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_arm_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..e0c0d5c 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_arm_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..5d447c3 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_arm_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..0656e8f 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_arm_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..6e3a966 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_arm_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..ca5e3cc 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_arm_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..e3978e5 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_arm_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..5080d2c 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_arm_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..3c9768d 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_arm_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 0b67e10..1a1eed8 100644
>     --- a/gcc/testsuite/lib/target-supports.exp
>     +++ b/gcc/testsuite/lib/target-supports.exp
>     @@ -4181,13 +4181,25 @@ proc check_effective_target_arm_fp16_hw { } {
>      #       /* { dg-require-effective-target arm_arch_v5t_multilib } */
>      foreach { armfunc armflag armdefs } {
>             v4 "-march=armv4 -marm" __ARM_ARCH_4__
>     -       v4t "-march=armv4t" __ARM_ARCH_4T__
>     -       v5t "-march=armv5t" __ARM_ARCH_5T__
>     -       v5te "-march=armv5te" __ARM_ARCH_5TE__
>     -       v6 "-march=armv6" __ARM_ARCH_6__
>     -       v6k "-march=armv6k" __ARM_ARCH_6K__
>     +       v4t "-march=armv4t -mfloat-abi=softfp" __ARM_ARCH_4T__
>     +       v4t_arm "-march=armv4t -marm" __ARM_ARCH_4T__
>     +       v4t_thumb "-march=armv4t -mthumb -mfloat-abi=softfp"
>     __ARM_ARCH_4T__
>     +       v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__
>     +       v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__
>     +       v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp"
>     __ARM_ARCH_5T__
>     +       v5te "-march=armv5te -mfloat-abi=softfp" __ARM_ARCH_5TE__
>     +       v5te_arm "-march=armv5te -marm" __ARM_ARCH_5TE__
>     +       v5te_thumb "-march=armv5te -mthumb -mfloat-abi=softfp"
>     __ARM_ARCH_5TE__
>     +       v6 "-march=armv6 -mfloat-abi=softfp" __ARM_ARCH_6__
>     +       v6_arm "-march=armv6 -marm" __ARM_ARCH_6__
>     +       v6_thumb "-march=armv6 -mthumb -mfloat-abi=softfp"
>     __ARM_ARCH_6__
>     +       v6k "-march=armv6k -mfloat-abi=softfp" __ARM_ARCH_6K__
>     +       v6k_arm "-march=armv6k -marm" __ARM_ARCH_6K__
>     +       v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp"
>     __ARM_ARCH_6K__
>             v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
>     -       v6z "-march=armv6z" __ARM_ARCH_6Z__
>     +       v6z "-march=armv6z -mfloat-abi=softfp" __ARM_ARCH_6Z__
>     +       v6z_arm "-march=armv6z -marm" __ARM_ARCH_6Z__
>     +       v6z_thumb "-march=armv6z -mthumb -mfloat-abi=softfp"
>     __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__
>     @@ -4204,10 +4216,6 @@ foreach { armfunc armflag armdefs } {
>             v8r "-march=armv8-r" __ARM_ARCH_8R__ } {
>          eval [string map [list FUNC $armfunc FLAG $armflag DEFS
>     $armdefs ] {
>             proc check_effective_target_arm_arch_FUNC_ok { } {
>     -           if { [ string match "*-marm*" "FLAG" ] &&
>     -               ![check_effective_target_arm_arm_ok] } {
>     -               return 0
>     -           }
>                 return [check_no_compiler_messages arm_arch_FUNC_ok
>     assembly {
>                     #if !(DEFS)
>                     #error !(DEFS)
>     --
>     2.6.3
>
Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Wilco Dijkstra-2
In reply to this post by Christophe Lyon
Hi Christophe,

Can you explain this in more detail - it doesn't make sense to me to force the
Thumb bit during unwinding since it should already be correct, even on a
Thumb-only CPU. Perhaps the kernel code that pushes an incorrect address on
the stack could be fixed instead?

> Without this, when we are unwinding across a signal frame we can jump
> to an even address which leads to an exception.
>
> This is needed in __gnu_persnality_sigframe_fdpic() when restoring the
> PC from the signal frame since the PC saved by the kernel has the LSB
> bit set to zero.

Wilco
Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Christophe Lyon
On 17/09/2019 13:38, Wilco Dijkstra wrote:

> Hi Christophe,
>
> Can you explain this in more detail - it doesn't make sense to me to force the
> Thumb bit during unwinding since it should already be correct, even on a
> Thumb-only CPU. Perhaps the kernel code that pushes an incorrect address on
> the stack could be fixed instead?
>
>> Without this, when we are unwinding across a signal frame we can jump
>> to an even address which leads to an exception.
>>
>> This is needed in __gnu_persnality_sigframe_fdpic() when restoring the
>> PC from the signal frame since the PC saved by the kernel has the LSB
>> bit set to zero.
>
> Wilco
> .
>

Indeed, I've noticed the problem mentioned by Matthew since I committed that patch.

I was about to propose a fix, replacing #if (__thumb__) with #if (!__ARM_ARCH_ISA_ARM), but you are right: maybe the kernel code should be fixed instead.

So far I haven't managed to reproduce a failure in FDPIC mode without this patch though...

Thanks and sorry for the breakage.

Christophe

Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Christophe Lyon-2
On Tue, 17 Sep 2019 at 14:08, Christophe Lyon <[hidden email]> wrote:

>
> On 17/09/2019 13:38, Wilco Dijkstra wrote:
> > Hi Christophe,
> >
> > Can you explain this in more detail - it doesn't make sense to me to force the
> > Thumb bit during unwinding since it should already be correct, even on a
> > Thumb-only CPU. Perhaps the kernel code that pushes an incorrect address on
> > the stack could be fixed instead?
> >
> >> Without this, when we are unwinding across a signal frame we can jump
> >> to an even address which leads to an exception.
> >>
> >> This is needed in __gnu_persnality_sigframe_fdpic() when restoring the
> >> PC from the signal frame since the PC saved by the kernel has the LSB
> >> bit set to zero.
> >
> > Wilco
> > .
> >
>
> Indeed, I've noticed the problem mentioned by Matthew since I committed that patch.
>
> I was about to propose a fix, replacing #if (__thumb__) with #if (!__ARM_ARCH_ISA_ARM), but you are right: maybe the kernel code should be fixed instead.
>
> So far I haven't managed to reproduce a failure in FDPIC mode without this patch though...
>
> Thanks and sorry for the breakage.
>

I'm having problems with the board I use for testing, so I propose to
revert that patch until I have a better description of the problem it
fixed.
OK?

Christophe

> Christophe
>
Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Kyrill Tkachov-2

On 9/19/19 4:13 PM, Christophe Lyon wrote:

> On Tue, 17 Sep 2019 at 14:08, Christophe Lyon <[hidden email]>
> wrote:
> >
> > On 17/09/2019 13:38, Wilco Dijkstra wrote:
> > > Hi Christophe,
> > >
> > > Can you explain this in more detail - it doesn't make sense to me
> to force the
> > > Thumb bit during unwinding since it should already be correct,
> even on a
> > > Thumb-only CPU. Perhaps the kernel code that pushes an incorrect
> address on
> > > the stack could be fixed instead?
> > >
> > >> Without this, when we are unwinding across a signal frame we can jump
> > >> to an even address which leads to an exception.
> > >>
> > >> This is needed in __gnu_persnality_sigframe_fdpic() when
> restoring the
> > >> PC from the signal frame since the PC saved by the kernel has the LSB
> > >> bit set to zero.
> > >
> > > Wilco
> > > .
> > >
> >
> > Indeed, I've noticed the problem mentioned by Matthew since I
> committed that patch.
> >
> > I was about to propose a fix, replacing #if (__thumb__) with #if
> (!__ARM_ARCH_ISA_ARM), but you are right: maybe the kernel code should
> be fixed instead.
> >
> > So far I haven't managed to reproduce a failure in FDPIC mode
> without this patch though...
> >
> > Thanks and sorry for the breakage.
> >
>
> I'm having problems with the board I use for testing, so I propose to
> revert that patch until I have a better description of the problem it
> fixed.
> OK?

Ok by me as long as lives the fdpic toolchain in a usable state (barring
the potential issue here)

Thanks,

Kyrill


>
> Christophe
>
> > Christophe
> >
Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Matthew Malcomson
On 19/09/19 16:14, Kyrill Tkachov wrote:

>
> On 9/19/19 4:13 PM, Christophe Lyon wrote:
>> On Tue, 17 Sep 2019 at 14:08, Christophe Lyon <[hidden email]>
>> wrote:
>> >
>> > On 17/09/2019 13:38, Wilco Dijkstra wrote:
>> > > Hi Christophe,
>> > >
>> > > Can you explain this in more detail - it doesn't make sense to me
>> to force the
>> > > Thumb bit during unwinding since it should already be correct,
>> even on a
>> > > Thumb-only CPU. Perhaps the kernel code that pushes an incorrect
>> address on
>> > > the stack could be fixed instead?
>> > >
>> > >> Without this, when we are unwinding across a signal frame we can
>> jump
>> > >> to an even address which leads to an exception.
>> > >>
>> > >> This is needed in __gnu_persnality_sigframe_fdpic() when
>> restoring the
>> > >> PC from the signal frame since the PC saved by the kernel has the
>> LSB
>> > >> bit set to zero.
>> > >
>> > > Wilco
>> > > .
>> > >
>> >
>> > Indeed, I've noticed the problem mentioned by Matthew since I
>> committed that patch.
>> >
>> > I was about to propose a fix, replacing #if (__thumb__) with #if
>> (!__ARM_ARCH_ISA_ARM), but you are right: maybe the kernel code should
>> be fixed instead.
>> >
>> > So far I haven't managed to reproduce a failure in FDPIC mode
>> without this patch though...
>> >
>> > Thanks and sorry for the breakage.
>> >
>>
>> I'm having problems with the board I use for testing, so I propose to
>> revert that patch until I have a better description of the problem it
>> fixed.
>> OK?
>
> Ok by me as long as lives the fdpic toolchain in a usable state (barring
> the potential issue here)

Thanks Christophe -- reverting that patch would help our internal
testing a lot!
MM

>
> Thanks,
>
> Kyrill
>
>
>>
>> Christophe
>>
>> > Christophe
>> >

Reply | Threaded
Open this post in threaded view
|

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

Christophe Lyon-2
On Fri, 20 Sep 2019 at 14:51, Matthew Malcomson
<[hidden email]> wrote:

>
> On 19/09/19 16:14, Kyrill Tkachov wrote:
> >
> > On 9/19/19 4:13 PM, Christophe Lyon wrote:
> >> On Tue, 17 Sep 2019 at 14:08, Christophe Lyon <[hidden email]>
> >> wrote:
> >> >
> >> > On 17/09/2019 13:38, Wilco Dijkstra wrote:
> >> > > Hi Christophe,
> >> > >
> >> > > Can you explain this in more detail - it doesn't make sense to me
> >> to force the
> >> > > Thumb bit during unwinding since it should already be correct,
> >> even on a
> >> > > Thumb-only CPU. Perhaps the kernel code that pushes an incorrect
> >> address on
> >> > > the stack could be fixed instead?
> >> > >
> >> > >> Without this, when we are unwinding across a signal frame we can
> >> jump
> >> > >> to an even address which leads to an exception.
> >> > >>
> >> > >> This is needed in __gnu_persnality_sigframe_fdpic() when
> >> restoring the
> >> > >> PC from the signal frame since the PC saved by the kernel has the
> >> LSB
> >> > >> bit set to zero.
> >> > >
> >> > > Wilco
> >> > > .
> >> > >
> >> >
> >> > Indeed, I've noticed the problem mentioned by Matthew since I
> >> committed that patch.
> >> >
> >> > I was about to propose a fix, replacing #if (__thumb__) with #if
> >> (!__ARM_ARCH_ISA_ARM), but you are right: maybe the kernel code should
> >> be fixed instead.
> >> >
> >> > So far I haven't managed to reproduce a failure in FDPIC mode
> >> without this patch though...
> >> >
> >> > Thanks and sorry for the breakage.
> >> >
> >>
> >> I'm having problems with the board I use for testing, so I propose to
> >> revert that patch until I have a better description of the problem it
> >> fixed.
> >> OK?
> >
> > Ok by me as long as lives the fdpic toolchain in a usable state (barring
> > the potential issue here)
>
> Thanks Christophe -- reverting that patch would help our internal
> testing a lot!
> MM
>
OK, I've reverted it.

Christophe

> >
> > Thanks,
> >
> > Kyrill
> >
> >
> >>
> >> Christophe
> >>
> >> > Christophe
> >> >
>
12