From: Christophe Lyon Date: Mon, 23 Nov 2020 09:58:43 +0000 (+0000) Subject: testsuite/arm: add missing -mthumb to several tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=771a4552b63ede699c261d94c426451fad38793a;p=gcc.git testsuite/arm: add missing -mthumb to several tests Some tests force -mcpu=cortex-mXX but do not add -mthumb, causing errors if GCC is not configured to default to Thumb code (--with-mode=thumb): cc1: error: target CPU does not support ARM mode This patch adds -mthumb where relevant. 2020-11-23 Christophe Lyon gcc/testsuite/ * gcc.target/arm/cortex-m55-nodsp-flag-hard.c: Add -mthumb. * gcc.target/arm/cortex-m55-nodsp-flag-softfp.c: Likewise. * gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c: Likewise. * gcc.target/arm/cortex-m55-nofp-flag-hard.c: Likewise. * gcc.target/arm/cortex-m55-nofp-flag-softfp.c: Likewise. * gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c: Likewise. * gcc.target/arm/cortex-m55-nomve-flag-hard.c: Likewise. * gcc.target/arm/cortex-m55-nomve-flag-softfp.c: Likewise. * gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c: Likewise. * gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c: Likewise. * gcc.target/arm/mve/intrinsics/pr97327.c: Likewise. --- diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c index b3c7fd06a1a..92c15112ae7 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nodsp -mfloat-abi=hard -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nodsp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler "\.arch_extension fp" } } */ /* { dg-final { scan-assembler "\.arch_extension fp.dp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension dsp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c index 3806554761f..89d778f8ecb 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nodsp -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nodsp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler "\.arch_extension fp" } } */ /* { dg-final { scan-assembler "\.arch_extension fp.dp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension dsp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c index d22eb4e0630..405090ca9e9 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nodsp+nofp -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nodsp+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension fp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension fp.dp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension dsp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c index da1cc25e83b..6a92dedcc59 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nofp -mfloat-abi=hard -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nofp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension fp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c index 0a4fb14bd9b..25e80e9bd64 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nofp -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension fp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c index 2ae7f34d456..38042cc490c 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nomve+nofp -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nomve+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */ /* { dg-final { scan-assembler-not "\.arch_extension mve.fp" } } */ /* { dg-final { scan-assembler-not "\.arch_extension fp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c index a6ccd7b6ed4..2366e99ad24 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nomve -mfloat-abi=hard -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nomve -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ /* { dg-final { scan-assembler "\.arch_extension fp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c index 2ad976a7960..eb2d63d3291 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nomve -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nomve -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ /* { dg-final { scan-assembler "\.arch_extension fp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c index 40d54b89bef..e7e57d986ca 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mfloat-abi=hard -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension mve.fp" } } */ /* { dg-final { scan-assembler "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c index c72680314cf..42889aad4a3 100644 --- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c +++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mfloat-abi=softfp -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */ /* { dg-final { scan-assembler-not "\.arch_extension mve.fp" } } */ /* { dg-final { scan-assembler "\.arch_extension mve" } } */ /* { dg-final { scan-assembler "\.arch_extension dsp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c index 8f6d3606381..d19bde59266 100644 --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c @@ -1,6 +1,6 @@ /* { 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 -mfloat-abi=soft -mfpu=auto -Werror" } */ +/* { dg-additional-options "-mcpu=cortex-m55 -mthumb -mfloat-abi=soft -mfpu=auto -Werror" } */ int main () {