public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [testsuite][arm] Fix cmse-15.c expected output
Date: Tue, 7 Apr 2020 12:54:14 +0200	[thread overview]
Message-ID: <CAKdteOYEQQdCmy5=3e2Ln=YtEWuZbS9p=fkDCF8GXMiP7LfNCQ@mail.gmail.com> (raw)
In-Reply-To: <7b9ce0a5-b20b-ce05-9d0e-aca082cdef05@arm.com>

On Tue, 7 Apr 2020 at 12:31, Andre Vieira (lists)
<andre.simoesdiasvieira@arm.com> wrote:
>
> On 06/04/2020 16:12, Christophe Lyon via Gcc-patches wrote:
> > Hi,
> >
> > While checking Martin's fix for PR ipa/94445, he made me realize that
> > the cmse-15.c testcase still fails at -Os because ICF means that we
> > generate
> > nonsecure2:
> >          b       nonsecure0
> >
> > which is OK, but does not match the currently expected
> > nonsecure2:
> > ...
> >          bl      __gnu_cmse_nonsecure_call
> >
> > (see https://gcc.gnu.org/pipermail/gcc-patches/2020-April/543190.html)
> >
> > The test has already different expectations for v8-M and v8.1-M.
> >
> > I've decided to try to use check-function-bodies to account for the
> > different possibilities:
> > - v8-M vs v8.1-M via two different prefixes
> > - code generation variants (-0?) via multiple regexps
> >
> > I've tested that the test now passes with --target-board=-march=armv8-m.main
> > and --target-board=-march=armv8.1-m.main.
> >
> > I feel this a bit too much of a burden for the purpose, maybe there's
> > a better way of handling all these alternatives (in particular,
> > there's a lot of duplication since the expected code for the secure*
> > functions is the same for v8-M and v8.1-M).
> >
> > OK?
> >
> > Thanks,
> >
> > Christophe
> Hi Christophe,
>
> This check-function-bodies functionality is pretty sweet, I assume the (
> A | B ) checks for either of them?

Yes.

> If so that looks like a good improvement. Ideally we'd also check the
> clearing for the v8.1-M cases, but that wasn't there before either and
> they would need again splitting for -mfloat-abi=soft+softfp and
> -mfloat-abi=hard.
>
Not sure what you mean?
The only nonsecure test with the (A|B) construct is:
+*Clear nonsecure2:
+*Clear ...
+*Clear (
+*Clear blxns r[0-3]
+*Clear |
+*Clear b nonsecure0
+*Clear )

So it does check the clearing (blxns), and 'b nonsecure0' is as valid
as the result of the test for nonsecure0.


>
> So yeah this LGTM but you need approval from a port/global maintainer.
>
Thanks

> Cheers,
> Andre

  reply	other threads:[~2020-04-07 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 15:12 Christophe Lyon
2020-04-07 10:31 ` Andre Vieira (lists)
2020-04-07 10:54   ` Christophe Lyon [this message]
2020-04-08  9:47 ` Richard Sandiford
2020-04-08 18:29   ` Christophe Lyon
2020-04-09 10:57     ` Richard Sandiford

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='CAKdteOYEQQdCmy5=3e2Ln=YtEWuZbS9p=fkDCF8GXMiP7LfNCQ@mail.gmail.com' \
    --to=christophe.lyon@linaro.org \
    --cc=andre.simoesdiasvieira@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).