public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc-patches@gcc.gnu.org,
	Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Mike Stump <mikestump@comcast.net>,
	Nick Clifton <nickc@redhat.com>,
	Ramana Radhakrishnan <ramana.gcc@gmail.com>
Subject: Re: [PATCH v2] [testsuite] [arm] add effective target and options for pacbti tests
Date: Wed, 16 Oct 2024 17:24:55 +0100	[thread overview]
Message-ID: <99a69ff1-e172-4ce0-b902-fd4d57dec30f@arm.com> (raw)
In-Reply-To: <or34rh9ulo.fsf_-_@lxoliva.fsfla.org>

On 19/04/2024 17:37, Alexandre Oliva wrote:
> Hello, Richard,
> 
> Thanks, your response was very informative.
> 
> Here's a revised patch.
> 
> arm pac and bti tests that use -march=armv8.1-m.main get an implicit
> -mthumb, that is incompatible with vxworks kernel mode.  Declaring the
> requirement for a 8.1-m.main-compatible toolchain is enough to avoid
> those fails, because the toolchain feature test fails in kernel mode,
> but taking the -march options from the standardized arch tests, after
> testing for support for the corresponding effective target, makes it
> generally safer, and enables us to drop skip directives and extraneous
> option variants.
> 
> Tested all 6 modified testcases with an x86_64-linux-gnu-x-arm-eabi
> uberbaum build.  Ok to install?

Apologies for the delay replying.  Yes, this is OK.

Thanks,

R.

> 
> 
> for  gcc/testsuite/ChangeLog
> 
> 	* gcc.target/arm/bti-1.c: Require arch, use its opts, drop skip.
> 	* gcc.target/arm/bti-2.c: Likewise.
> 	* gcc.target/arm/acle/pacbti-m-predef-11.c: Likewise.
> 	* gcc.target/arm/acle/pacbti-m-predef-12.c: Likewise.
> 	* gcc.target/arm/acle/pacbti-m-predef-7.c: Likewise.
> 	* g++.target/arm/pac-1.C: Likewise.  Drop +mve.
> ---
>  gcc/testsuite/g++.target/arm/pac-1.C               |    5 +++--
>  .../gcc.target/arm/acle/pacbti-m-predef-11.c       |    4 ++--
>  .../gcc.target/arm/acle/pacbti-m-predef-12.c       |    5 +++--
>  .../gcc.target/arm/acle/pacbti-m-predef-7.c        |    5 +++--
>  gcc/testsuite/gcc.target/arm/bti-1.c               |    5 +++--
>  gcc/testsuite/gcc.target/arm/bti-2.c               |    5 +++--
>  6 files changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/gcc/testsuite/g++.target/arm/pac-1.C b/gcc/testsuite/g++.target/arm/pac-1.C
> index f671a27b048c6..ac15ae18197ca 100644
> --- a/gcc/testsuite/g++.target/arm/pac-1.C
> +++ b/gcc/testsuite/g++.target/arm/pac-1.C
> @@ -1,7 +1,8 @@
>  /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register.  */
>  /* { dg-do compile } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
> -/* { dg-options "-march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -g -O0" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
> +/* { dg-additional-options "-mbranch-protection=pac-ret -mfloat-abi=hard -g -O0" } */
>  
>  __attribute__((noinline)) void
>  fn1 (int a, int b, int c)
> diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c
> index 6a5ae92c567f3..c9c40f44027d4 100644
> --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c
> +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" "-mfloat-abi=*" } } */
> -/* { dg-options "-march=armv8.1-m.main+fp+pacbti" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
>  
>  #if (__ARM_FEATURE_BTI != 1)
>  #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined to 1."
> diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c
> index db40b17c3b030..c26051347a2cc 100644
> --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c
> +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
> -/* { dg-options "-march=armv8-m.main+fp -mfloat-abi=softfp" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main } */
> +/* { dg-additional-options "-mfloat-abi=softfp" } */
>  
>  #if defined (__ARM_FEATURE_BTI)
>  #error "Feature test macro __ARM_FEATURE_BTI should not be defined."
> diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c
> index 1b25907635e24..92f500c1449b3 100644
> --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c
> +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
> -/* { dg-additional-options "-march=armv8.1-m.main+pacbti+fp --save-temps -mfloat-abi=hard" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
> +/* { dg-additional-options "--save-temps -mfloat-abi=hard" } */
>  
>  #if defined (__ARM_FEATURE_BTI_DEFAULT)
>  #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be undefined."
> diff --git a/gcc/testsuite/gcc.target/arm/bti-1.c b/gcc/testsuite/gcc.target/arm/bti-1.c
> index 79dd8010d2dab..a34bb0842b632 100644
> --- a/gcc/testsuite/gcc.target/arm/bti-1.c
> +++ b/gcc/testsuite/gcc.target/arm/bti-1.c
> @@ -1,7 +1,8 @@
>  /* Check that GCC does bti instruction.  */
>  /* { dg-do compile } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
> -/* { dg-options "-march=armv8.1-m.main -mthumb -mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main } */
> +/* { dg-additional-options "-mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */
>  
>  int
>  main (void)
> diff --git a/gcc/testsuite/gcc.target/arm/bti-2.c b/gcc/testsuite/gcc.target/arm/bti-2.c
> index 33910563849a4..e5bc4d5543a8d 100644
> --- a/gcc/testsuite/gcc.target/arm/bti-2.c
> +++ b/gcc/testsuite/gcc.target/arm/bti-2.c
> @@ -1,8 +1,9 @@
>  /* { dg-do compile } */
>  /* -Os to create jump table.  */
>  /* { dg-options "-Os" } */
> -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
> -/* { dg-options "-march=armv8.1-m.main -mthumb -mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */
> +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
> +/* { dg-add-options arm_arch_v8_1m_main } */
> +/* { dg-additional-options "-mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */
>  
>  extern int f1 (void);
>  extern int f2 (void);
> 


      parent reply	other threads:[~2024-10-16 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16  3:48 [PATCH] [testsuite] [arm] require arm_v8_1m_main " Alexandre Oliva
2024-04-16  8:56 ` Richard Earnshaw (lists)
2024-04-19 12:45   ` Alexandre Oliva
2024-04-19 13:13     ` Richard Earnshaw (lists)
2024-04-19 16:37       ` [PATCH v2] [testsuite] [arm] add effective target and options " Alexandre Oliva
2024-05-25  8:20         ` Alexandre Oliva
2024-10-16 16:24         ` Richard Earnshaw (lists) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99a69ff1-e172-4ce0-b902-fd4d57dec30f@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=nickc@redhat.com \
    --cc=oliva@adacore.com \
    --cc=ramana.gcc@gmail.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).