]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: arm: Use effective-target for {gcc,g++}.target/arm/ tests
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Sun, 13 Oct 2024 18:52:50 +0000 (20:52 +0200)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Thu, 21 Nov 2024 06:51:48 +0000 (07:51 +0100)
Update test cases to use -mcpu=unset/-march=unset feature introduced in
r15-3606-g7d6c6a0d15c.

gcc/testsuite/ChangeLog:

* g++.target/arm/pr103676.C: Use effective-target
arm_cpu_cortex_m7.
* gcc.target/arm/no-volatile-in-it.c: Likewise.
* gcc.target/arm/fma-sp.c: Use effective-target
arm_cpu_cortex_m4_hard.
* gcc.target/arm/pr53859.c: Use effective-target
arm_cpu_cortex_m4.
* gcc.target/arm/mve/intrinsics/pr97327.c: Use effective-target
arm_cpu_cortex_m55.
* gcc.target/arm/pr65067.c: Use effective-target
arm_cpu_cortex_m3.
* lib/target-supports.exp: Define effective-target
arm_cpu_cortex_m3, arm_cpu_cortex_m4, arm_cpu_cortex_m4_hard,
arm_cpu_cortex_m7 and arm_cpu_cortex_m55.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/testsuite/g++.target/arm/pr103676.C
gcc/testsuite/gcc.target/arm/fma-sp.c
gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c
gcc/testsuite/gcc.target/arm/no-volatile-in-it.c
gcc/testsuite/gcc.target/arm/pr53859.c
gcc/testsuite/gcc.target/arm/pr65067.c
gcc/testsuite/lib/target-supports.exp

index 1607564ff5d1e54607d9aa127616ec10773644e1..eefcd9dc6a1c87b22b9022f9d054862372e12f75 100644 (file)
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-additional-options "-mcpu=cortex-m7 -mthumb -O2" }  */
+/* { dg-require-effective-target arm_cpu_cortex_m7_ok } */
+/* { dg-additional-options "-O2" }  */
+/* { dg-add-options arm_cpu_cortex_m7 } */
+
 
 typedef unsigned long long uint64_t;
 struct timer {
index e1884545f0dbf8ece87c7a6cb668af9e52ae5058..570457bbc8af9bc68a8738b99d187800b753ac84 100644 (file)
@@ -1,9 +1,7 @@
 /* { dg-do compile } */
-/* { dg-skip-if "avoid conflicts with multilib options" { ! arm_thumb2_ok } { "-march=*" } { "" } } */
-/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" } } */
-/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv4-sp-d16" } } */
-/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-O2 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -mfloat-abi=hard" } */
+/* { dg-require-effective-target arm_cpu_cortex_m4_hard_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m4_hard } */
 
 #include "fma.h"
 
index d19bde59266355426a17500fbc58f43d25adb4e2..dd6cc59863063308731d834c9b45e0d9292bdb01 100644 (file)
@@ -1,6 +1,7 @@
-/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
-/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
-/* { dg-additional-options "-mcpu=cortex-m55 -mthumb -mfloat-abi=soft -mfpu=auto -Werror" } */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_cpu_cortex_m55_ok } */
+/* { dg-add-options arm_cpu_cortex_m55 } */
+/* { dg-additional-options "-mfloat-abi=soft -Werror" } */
 
 int main ()
 {
index 6f3664d3b3d11544e0293c342c606989ee6d1471..119e9ecf3217f75a9501e1174de83af2c23ad46b 100644 (file)
@@ -1,7 +1,8 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_cpu_cortex_m7_ok } */
 /* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-march=*" "-mcpu=*" } { "-mcpu=cortex-m7" } } */
-/* { dg-options "-Os -mthumb -mcpu=cortex-m7" } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m7 } */
 
 int
 foo (int a, int b, volatile int *c, volatile int *d)
index 003489e0bb7c88cc1d80b329ffa4e61cc9ceec21..48d9df85be68fc28d2901e2e10897f49b359b3f7 100644 (file)
@@ -1,7 +1,8 @@
 /* PR target/53859 */
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-mcpu=cortex-m4 -mthumb -O2" } */
+/* { dg-require-effective-target arm_cpu_cortex_m4_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m4 } */
 
 void bar (int,int,char* ,int);
 
index 05da29483f65156859976e5a8de9eabb314607fe..b351aaafc4a712c63bbb4512d0d45dcdc9cad4bf 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-mthumb -mcpu=cortex-m3 -O2" } */
+/* { dg-require-effective-target arm_cpu_cortex_m3_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m3 } */
 
 struct tmp {
  unsigned int dummy;
index 7cf0287643ecb8ae3878a61b33b33474d6657047..f38287939865fe242fbde2757d9f66c46c16e45d 100644 (file)
@@ -5854,7 +5854,12 @@ foreach { armfunc armflag armdefs } {
            cortex_m0_small "-mcpu=cortex-m0.small-multiply -mfloat-abi=soft -mthumb" "__ARM_ARCH_6M__ && __thumb__"
            cortex_m0plus_small "-mcpu=cortex-m0plus.small-multiply -mfloat-abi=soft -mthumb" "__ARM_ARCH_6M__ && __thumb__"
            cortex_m1_small "-mcpu=cortex-m1.small-multiply -mfloat-abi=soft -mthumb" "__ARM_ARCH_6M__ && __thumb__"
+           cortex_m3 "-mcpu=cortex-m3 -mfloat-abi=soft -mthumb" "__ARM_ARCH_7M__"
+           cortex_m4 "-mcpu=cortex-m4 -mfpu=auto -mthumb" "__ARM_ARCH_7EM__"
+           cortex_m4_hard "-mcpu=cortex-m4 -mfpu=auto -mfloat-abi=hard -mthumb" "__ARM_ARCH_7EM__"
+           cortex_m7 "-mcpu=cortex-m7 -mfpu=auto -mthumb" "__ARM_ARCH_7EM__"
            cortex_m23 "-mcpu=cortex-m23 -mfloat-abi=soft -mthumb" "__ARM_ARCH_8M_BASE__  && __thumb__"
+           cortex_m55 "-mcpu=cortex-m55 -mfpu=auto -mthumb" "__ARM_ARCH_8M_MAIN__  && __thumb__"
        } {
     eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
        proc check_effective_target_arm_cpu_FUNC_ok { } {