public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/gcs] aarch64: Add asm helpers for GCS
@ 2024-02-14 15:06 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2024-02-14 15:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=15d1674cae644619d521af249b3a4f1c17cdcee9
commit 15d1674cae644619d521af249b3a4f1c17cdcee9
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Wed Feb 22 14:35:00 2023 +0000
aarch64: Add asm helpers for GCS
The Guarded Control Stack instructions can be present even if the
hardware does not support the extension (runtime checked feature),
so the asm code should be backward compatible with old assemblers.
Diff:
---
sysdeps/aarch64/sysdep.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h
index 464674e89c..661d9fe8c1 100644
--- a/sysdeps/aarch64/sysdep.h
+++ b/sysdeps/aarch64/sysdep.h
@@ -74,6 +74,13 @@ strip_pac (void *p)
#define PACIASP hint 25
#define AUTIASP hint 29
+/* Guarded Control Stack support. */
+#define CHKFEAT_X16 hint 40
+#define MRS_GCSPR(x) mrs x, s3_3_c2_c5_1
+#define GCSPOPM(x) sysl x, #3, c7, c7, #1
+#define GCSSS1(x) sys #3, c7, c7, #2, x
+#define GCSSS2(x) sysl x, #3, c7, c7, #3
+
/* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */
#define FEATURE_1_AND 0xc0000000
#define FEATURE_1_BTI 1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-14 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 15:06 [glibc/arm/gcs] aarch64: Add asm helpers for GCS 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).