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

gcc/testsuite/ChangeLog:

* gcc.target/arm/small-multiply-m0-1.c: Use effective-target
arm_arch_v6m and added option "-march=unset".
* gcc.target/arm/small-multiply-m0-2.c: Likewise.
* gcc.target/arm/small-multiply-m0-3.c: Likewise.
* gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
* gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
* gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
* gcc.target/arm/small-multiply-m1-1.c: Likewise.
* gcc.target/arm/small-multiply-m1-2.c: Likewise.
* gcc.target/arm/small-multiply-m1-3.c: Likewise.
* lib/target-supports.exp: Define effective-target
arm_cpu_cortex_m0_small, arm_cpu_cortex_m0plus_small and
arm_cpu_cortex_m1_small.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c
gcc/testsuite/lib/target-supports.exp

index 52c652c1cba3729c121d613bdb8c9f3524b04c98..56253832533dcdd3313f82cf3fe93b7c97a6ab35 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -O2" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0_small_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m0_small } */
 
 int
 test (int a)
index 10d49e9eace6141a5d3c906e235b6bbddaed8b4e..38e353b4d92230e33d934527daad539f8049032d 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m0_small } */
 
 int
 test (int a)
index b4af511af86c88a6d98a2779b3dc808d2163380c..261961836b901f32bbbdce3eb41eea7fcb01d7a9 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m0_small } */
 
 int
 test (int a)
index 59dba7cf4abc814f0ee2cf9c4776d76d644a07fc..e03cc2d39c0e57afadc1f9d28f0702511511016f 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -O2" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0plus_small_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m0plus_small } */
 
 int
 test (int a)
index 685ef44077669e6bc7152dd64b94d99056b93dd2..0d886e1c6774161549041fa3939bf15d0b023737 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0plus_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m0plus_small } */
 
 int
 test (int a)
index d24e720fe677fde0adf6865b24b3daf7bb2d286c..7eea3412c608ad585213c27982229f951fc63448 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m0plus_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m0plus_small } */
 
 int
 test (int a)
index d966ae955ce8d8d02b438441a4d53262f7479d5f..07587acab6dce658ea2c993aef2fff5f68731cf2 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -O2" } */
+/* { dg-require-effective-target arm_cpu_cortex_m1_small_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_cpu_cortex_m1_small } */
 
 int
 test (int a)
index 60576bb9ed155d99851d6a00cd57eb3b78ea1a13..7ef606896fd9a104a4917cb2e33982eb57130537 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m1_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m1_small } */
 
 int
 test (int a)
index c56479d18973373fd8cc100d4614c083fd1a8cce..e300f04b1fbf8e1438979bf467cf27b5a37ed241 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
-/* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -Os" } */
+/* { dg-require-effective-target arm_cpu_cortex_m1_small_ok } */
+/* { dg-options "-Os" } */
+/* { dg-add-options arm_cpu_cortex_m1_small } */
 
 int
 test (int a)
index 593f02f6ea30b7a97d0898424bca3615aaebe3a3..7cf0287643ecb8ae3878a61b33b33474d6657047 100644 (file)
@@ -5851,6 +5851,9 @@ foreach { armfunc armflag armdefs } {
            xscale_arm "-mcpu=xscale -mfloat-abi=soft -marm" "__XSCALE__ && !__thumb__"
            cortex_a57 "-mcpu=cortex-a57" __ARM_ARCH_8A__
            cortex_m0 "-mcpu=cortex-m0 -mfloat-abi=soft -mthumb" "__ARM_ARCH_6M__ && __thumb__"
+           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_m23 "-mcpu=cortex-m23 -mfloat-abi=soft -mthumb" "__ARM_ARCH_8M_BASE__  && __thumb__"
        } {
     eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {