public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/gcs)] aarch64: Add support for chkfeat insn
@ 2024-02-14 15:26 Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2024-02-14 15:26 UTC (permalink / raw)
To: gcc-cvs
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")
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/vendors/ARM/heads/gcs)] aarch64: Add support for chkfeat insn
@ 2024-04-10 10:48 Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2024-04-10 10:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:309f26c530aaaa1d11891a6adddf9515adf5a9b0
commit 309f26c530aaaa1d11891a6adddf9515adf5a9b0
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 385a669b9b3..a20462303b5 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.
@@ -8258,6 +8259,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")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-10 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 15:26 [gcc(refs/vendors/ARM/heads/gcs)] aarch64: Add support for chkfeat insn Szabolcs Nagy
2024-04-10 10:48 Szabolcs Nagy
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).