public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99271] [10 regression] Wrong code for Arm-v8-m.main CMSE calling __gnu_cmse_nonsecure_call
Date: Mon, 01 Mar 2021 17:45:07 +0000	[thread overview]
Message-ID: <bug-99271-4-bgYwSuwiLt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99271-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99271

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Earnshaw
<rearnsha@gcc.gnu.org>:

https://gcc.gnu.org/g:1b3bb23a576e6a864f540e3bea5097f47fea507c

commit r10-9398-g1b3bb23a576e6a864f540e3bea5097f47fea507c
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Mon Feb 22 15:00:53 2021 +0000

    arm: force use of r4 for __gnu_cmse_nonsecure_call when !FPCXT [PR99271]

    Commit r10-6017 relaxed the constraint on thumb2 calls to
    __gnu_cmse_nonsecure_call to allow any register for the call address.
    Although the initial code expansion continues to use r4 with the FPCXT
    extension is not enabled, the change was unsafe because subsequent
    optimizations could use the additional freedom to change which
    register was being used.

    To fix this we need to split the output patterns in the machine
    description to use distinct recognizers: one with the additional
    freedom when FPCXT is enabled an another that retains the original
    restrictions when the extension is not available.

    gcc:
            PR target/99271
            * config/arm/thumb2.md (nonsecure_call_reg_thumb2_fpcxt): New
pattern.
            (nonsecure_call_value_reg_thumb2_fpcxt): Likewise.
            (nonsecure_call_reg_thumb2): Restrict to using r4 for the callee
            address and disable when the FPCXT is not available.
            (nonsecure_call_value_reg_thumb2): Likewise.

    gcc/testsuite:
            * gcc.target/arm/cmse/cmse-18.c: New test.

  parent reply	other threads:[~2021-03-01 17:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 14:58 [Bug target/99271] New: [10/11 " rearnsha at gcc dot gnu.org
2021-02-25 14:58 ` [Bug target/99271] " rearnsha at gcc dot gnu.org
2021-02-25 17:17 ` cvs-commit at gcc dot gnu.org
2021-02-25 17:31 ` [Bug target/99271] [10 " rearnsha at gcc dot gnu.org
2021-02-26  7:12 ` rguenth at gcc dot gnu.org
2021-03-01 17:45 ` cvs-commit at gcc dot gnu.org [this message]
2021-03-01 17:46 ` rearnsha at gcc dot gnu.org

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=bug-99271-4-bgYwSuwiLt@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).