public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH] testsuite: Add _link flavor for several arm_arch* and arm* effective-targets
Date: Mon, 10 Jul 2023 15:58:42 +0200	[thread overview]
Message-ID: <CAPS5khbb2mRT+pH3g6+dAOdDyU3_sjNEwncU27MQF1CKNPN70A@mail.gmail.com> (raw)
In-Reply-To: <PAXPR08MB69267A1FEB0EAB0EB50494C89330A@PAXPR08MB6926.eurprd08.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 4003 bytes --]

On Mon, 10 Jul 2023 at 15:46, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> wrote:

>
>
> > -----Original Message-----
> > From: Christophe Lyon <christophe.lyon@linaro.org>
> > Sent: Friday, July 7, 2023 8:52 AM
> > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>;
> > Richard Earnshaw <Richard.Earnshaw@arm.com>
> > Cc: Christophe Lyon <christophe.lyon@linaro.org>
> > Subject: [PATCH] testsuite: Add _link flavor for several arm_arch* and
> arm*
> > effective-targets
> >
> > For arm targets, we generate many effective-targets with
> > check_effective_target_FUNC_multilib and
> > check_effective_target_arm_arch_FUNC_multilib which check if we can
> > link and execute a simple program with a given set of flags/multilibs.
> >
> > In some cases however, it's possible to link but not to execute a
> > program, so this patch adds similar _link effective-targets which only
> > check if link succeeds.
> >
> > The patch does not uupdate the documentation as it already lacks the
> > numerous existing related effective-targets.
>
> I think this looks ok but...
>
> >
> > 2023-07-07  Christophe Lyon  <christophe.lyon@linaro.org>
> >
> >       gcc/testsuite/
> >       * lib/target-supports.exp (arm_*FUNC_link): New effective-targets.
> > ---
> >  gcc/testsuite/lib/target-supports.exp | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >
> > diff --git a/gcc/testsuite/lib/target-supports.exp
> b/gcc/testsuite/lib/target-
> > supports.exp
> > index c04db2be7f9..d33bc077418 100644
> > --- a/gcc/testsuite/lib/target-supports.exp
> > +++ b/gcc/testsuite/lib/target-supports.exp
> > @@ -5129,6 +5129,14 @@ foreach { armfunc armflag armdefs } {
> >           return "$flags FLAG"
> >       }
> >
> > +        proc check_effective_target_arm_arch_FUNC_link { } {
> > +         return [check_no_compiler_messages arm_arch_FUNC_link
> > executable {
> > +             #include <stdint.h>
> > +             int dummy;
> > +             int main (void) { return 0; }
> > +         } [add_options_for_arm_arch_FUNC ""]]
> > +     }
> > +
> >       proc check_effective_target_arm_arch_FUNC_multilib { } {
> >           return [check_runtime arm_arch_FUNC_multilib {
> >               int
> > @@ -5906,6 +5914,7 @@ proc add_options_for_arm_v8_2a_bf16_neon {
> > flags } {
> >  #   arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension).
> >  #   arm_v8m_main_cde_fp: Armv8-m CDE with FP registers.
> >  #   arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE.
> > +#   arm_v8_1m_main_cde_mve_fp: Armv8.1-m CDE with MVE with FP
> > support.
> >  # Usage:
> >  #   /* { dg-require-effective-target arm_v8m_main_cde_ok } */
> >  #   /* { dg-add-options arm_v8m_main_cde } */
> > @@ -5965,6 +5974,24 @@ foreach { armfunc armflag armdef arminc } {
> >           return "$flags $et_FUNC_flags"
> >       }
> >
> > +        proc check_effective_target_FUNC_link { } {
> > +         if { ! [check_effective_target_FUNC_ok] } {
> > +             return 0;
> > +         }
> > +         return [check_no_compiler_messages FUNC_link executable {
> > +             #if !(DEF)
> > +             #error "DEF failed"
> > +             #endif
> > +             #include <arm_cde.h>
>
> ... why is arm_cde.h included here?
>
> It's the very same code as  check_effective_target_FUNC_multilib below.

I think it's needed in case the toolchain's default configuration is not
able to support CDE. I believe these tests would fail if the toolchain
defaults
to -mfloat-abi=soft (the gnu/stubs-{soft|hard}.h "usual" error)

I added this chunk for consistency with the other one, it's not needed at
the moment.

Christophe



> +             INC
> > +             int
> > +             main (void)
> > +             {
> > +                 return 0;
> > +             }
> > +         } [add_options_for_FUNC ""]]
> > +     }
> > +
> >       proc check_effective_target_FUNC_multilib { } {
> >           if { ! [check_effective_target_FUNC_ok] } {
> >               return 0;
> > --
> > 2.34.1
>
>

  reply	other threads:[~2023-07-10 13:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  7:51 [PATCH] doc: Document arm_v8_1m_main_cde_mve_fp Christophe Lyon
2023-07-07  7:51 ` [PATCH] testsuite: Add _link flavor for several arm_arch* and arm* effective-targets Christophe Lyon
2023-07-10 13:45   ` Kyrylo Tkachov
2023-07-10 13:58     ` Christophe Lyon [this message]
2023-07-10 14:02       ` Kyrylo Tkachov
2023-07-10 13:47 ` [PATCH] doc: Document arm_v8_1m_main_cde_mve_fp Kyrylo Tkachov
2024-05-28  9:31   ` Arm branding (was: [PATCH] doc: Document arm_v8_1m_main_cde_mve_fp) Gerald Pfeifer

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=CAPS5khbb2mRT+pH3g6+dAOdDyU3_sjNEwncU27MQF1CKNPN70A@mail.gmail.com \
    --to=christophe.lyon@linaro.org \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).