public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-8903] arm: add erratum mitigation to __gnu_cmse_nonsecure_call [PR102035]
Date: Tue, 24 Aug 2021 13:33:13 +0000 (GMT)	[thread overview]
Message-ID: <20210824133313.405C2385843C@sourceware.org> (raw)

https://gcc.gnu.org/g:2539763c89a6777502f16457269e2c31d6d95b67

commit r11-8903-g2539763c89a6777502f16457269e2c31d6d95b67
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Fri Jun 18 17:16:25 2021 +0100

    arm: add erratum mitigation to __gnu_cmse_nonsecure_call [PR102035]
    
    Add the recommended erratum mitigation sequence to
    __gnu_cmse_nonsecure_call for use on Armv8-m.main devices. Since this
    is in the library code we cannot know in advance whether the core we
    are running on will be affected by this, so always enable it.
    
    libgcc:
            PR target/102035
            * config/arm/cmse_nonsecure_call.S (__gnu_cmse_nonsecure_call):
            Add vlldm erratum work-around.
    (cherry picked from commit 574e7950bd6b34e9e2cacce18c802b45505d1d0a)

Diff:
---
 libgcc/config/arm/cmse_nonsecure_call.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libgcc/config/arm/cmse_nonsecure_call.S b/libgcc/config/arm/cmse_nonsecure_call.S
index 00830ade98e..c8e0fbbe665 100644
--- a/libgcc/config/arm/cmse_nonsecure_call.S
+++ b/libgcc/config/arm/cmse_nonsecure_call.S
@@ -102,6 +102,11 @@ blxns	    r4
 #ifdef __ARM_PCS_VFP
 vpop.f64    {d8-d15}
 #else
+/* VLLDM erratum mitigation sequence. */
+mrs	    r5, control
+tst	    r5, #8	  /* CONTROL_S.SFPA */
+it	    ne
+.inst.w	    0xeeb00a40	  /* vmovne s0, s0 */
 vlldm	    sp		  /* Lazy restore of d0-d16 and FPSCR.  */
 add	    sp, sp, #0x88 /* Free space used to save floating point registers.  */
 #endif /* __ARM_PCS_VFP */


                 reply	other threads:[~2021-08-24 13:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210824133313.405C2385843C@sourceware.org \
    --to=rearnsha@gcc.gnu.org \
    --cc=gcc-cvs@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).