public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/gcs)] aarch64: Add support for chkfeat insn
Date: Wed, 14 Feb 2024 15:26:39 +0000 (GMT)	[thread overview]
Message-ID: <20240214152639.F0335385E45F@sourceware.org> (raw)

https://gcc.gnu.org/g:3e65859dae0437d51d8e0aba24471fa11ec1aeeb

commit 3e65859dae0437d51d8e0aba24471fa11ec1aeeb
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue May 9 15:37:49 2023 +0100

    aarch64: Add support for chkfeat insn
    
    This is a hint space instruction to check for enabled HW features and
    update the x16 register accordingly.
    
    Use unspec_volatile to prevent reordering it around calls since calls
    can enable or disable HW features.
    
    gcc/ChangeLog:
    
            * config/aarch64/aarch64.md (aarch64_chkfeat): New.

Diff:
---
 gcc/config/aarch64/aarch64.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 15b08ab19819..3a3dc9ac6fe6 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -378,6 +378,7 @@
     UNSPECV_BTI_C		; Represent BTI c.
     UNSPECV_BTI_J		; Represent BTI j.
     UNSPECV_BTI_JC		; Represent BTI jc.
+    UNSPECV_CHKFEAT		; Represent CHKFEAT X16.
     UNSPECV_TSTART		; Represent transaction start.
     UNSPECV_TCOMMIT		; Represent transaction commit.
     UNSPECV_TCANCEL		; Represent transaction cancel.
@@ -8253,6 +8254,14 @@
   "msr\tnzcv, %0"
 )
 
+;; CHKFEAT instruction
+(define_insn "aarch64_chkfeat"
+  [(set (reg:DI R16_REGNUM)
+        (unspec_volatile:DI [(reg:DI R16_REGNUM)] UNSPECV_CHKFEAT))]
+  ""
+  "hint\\t40 // chkfeat x16"
+)
+
 ;; AdvSIMD Stuff
 (include "aarch64-simd.md")

             reply	other threads:[~2024-02-14 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 15:26 Szabolcs Nagy [this message]
2024-04-10 10:48 Szabolcs Nagy

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=20240214152639.F0335385E45F@sourceware.org \
    --to=nsz@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).