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-8904] arm: fix vlldm erratum for Armv8.1-m [PR102035] Date: Tue, 24 Aug 2021 13:33:18 +0000 (GMT) [thread overview] Message-ID: <20210824133318.7406B3857C78@sourceware.org> (raw) https://gcc.gnu.org/g:8933c1b66a6b7a66b8843e21c8cb6c0679fc2d09 commit r11-8904-g8933c1b66a6b7a66b8843e21c8cb6c0679fc2d09 Author: Richard Earnshaw <rearnsha@arm.com> Date: Fri Jun 18 17:18:37 2021 +0100 arm: fix vlldm erratum for Armv8.1-m [PR102035] For Armv8.1-m we generate code that emits VLLDM directly and do not rely on support code in the library, so emit the mitigation directly as well, when required. In this case, we can use the compiler options to determine when to apply the fix and when it is safe to omit it. gcc: PR target/102035 * config/arm/arm.md (attribute arch): Add fix_vlldm. (arch_enabled): Use it. * config/arm/vfp.md (lazy_store_multiple_insn): Add alternative to use when erratum mitigation is needed. (cherry picked from commit 30461cf8dba3d3adb15a125e4da48800eb2b9b8f) Diff: --- gcc/config/arm/arm.md | 11 +++++++++-- gcc/config/arm/vfp.md | 10 +++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 064604808cc..5d3f21b91c4 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -132,9 +132,12 @@ ; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode. "v6" ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without ; arm_arch6. "v6t2" for Thumb-2 with arm_arch6 and "v8mb" for ARMv8-M -; Baseline. This attribute is used to compute attribute "enabled", +; Baseline. "fix_vlldm" is for fixing the v8-m/v8.1-m VLLDM erratum. +; This attribute is used to compute attribute "enabled", ; use type "any" to enable an alternative in all cases. -(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,v8mb,iwmmxt,iwmmxt2,armv6_or_vfpv3,neon,mve" +(define_attr "arch" "any, a, t, 32, t1, t2, v6,nov6, v6t2, \ + v8mb, fix_vlldm, iwmmxt, iwmmxt2, armv6_or_vfpv3, \ + neon, mve" (const_string "any")) (define_attr "arch_enabled" "no,yes" @@ -177,6 +180,10 @@ (match_test "TARGET_THUMB1 && arm_arch8")) (const_string "yes") + (and (eq_attr "arch" "fix_vlldm") + (match_test "fix_vlldm")) + (const_string "yes") + (and (eq_attr "arch" "iwmmxt2") (match_test "TARGET_REALLY_IWMMXT2")) (const_string "yes") diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index 6cf5a5d8b69..c9f2f12b51e 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -1720,11 +1720,15 @@ (define_insn "lazy_load_multiple_insn" [(unspec_volatile - [(mem:BLK (match_operand:SI 0 "s_register_operand" "rk"))] + [(mem:BLK (match_operand:SI 0 "s_register_operand" "rk,rk"))] VUNSPEC_VLLDM)] "use_cmse && reload_completed" - "vlldm%?\\t%0" - [(set_attr "predicable" "yes") + "@ + vscclrm\\t{vpr}\;vlldm\\t%0 + vlldm\\t%0" + [(set_attr "arch" "fix_vlldm,*") + (set_attr "predicable" "no") + (set_attr "length" "8,4") (set_attr "type" "load_4")] )
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=20210824133318.7406B3857C78@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: linkBe 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).