diff options
author | Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> | 2024-10-13 20:37:18 +0200 |
---|---|---|
committer | Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> | 2024-11-21 07:51:42 +0100 |
commit | f55cc57c6e3bcb36279682254b9b532049ff3f9d (patch) | |
tree | f52ee8d3495d781e0bbe246111a59b105a19e924 /gcc | |
parent | 703839b8bd1ee667ae165ac435b0acedfb72cf4b (diff) | |
download | gcc-f55cc57c6e3bcb36279682254b9b532049ff3f9d.zip gcc-f55cc57c6e3bcb36279682254b9b532049ff3f9d.tar.gz gcc-f55cc57c6e3bcb36279682254b9b532049ff3f9d.tar.bz2 |
testsuite: arm: Use effective-target for small-multiply-m* tests
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>
Diffstat (limited to 'gcc')
10 files changed, 30 insertions, 27 deletions
diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c index 52c652c..5625383 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c index 10d49e9..38e353b 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c index b4af511..2619618 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c index 59dba7c..e03cc2d 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c index 685ef44..0d886e1 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c index d24e720..7eea341 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c b/gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c index d966ae9..07587ac 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c b/gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c index 60576bb..7ef6068 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c b/gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c index c56479d..e300f04 100644 --- a/gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c +++ b/gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c @@ -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) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 593f02f..7cf0287 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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 ] { |