From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 78548385E004; Wed, 14 Feb 2024 15:06:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78548385E004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707923177; bh=HKN7AIernbjzXHGJySbBU5f/T1sexF/MTWh1/llRHHc=; h=From:To:Subject:Date:From; b=rMZauDHNdXlY8boawOuZB+B4/765nvtZyqHOYhl3ysRQySGdWUw19yLmCi71g4wyq OLvlQh7lYpoqz5qfgy41OF//QyPxHRgtums/i7W8mtwyv7pZYvfHHk4ekGZxgoQD/j IMOY2eQ2Y6rXgl0omubnSbOqcsWNA+CM17jmoIek= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/gcs] aarch64: Add asm helpers for GCS X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/gcs X-Git-Oldrev: ccb4e98a6cbdf5b8939a6ae416248bb1436a1338 X-Git-Newrev: 15d1674cae644619d521af249b3a4f1c17cdcee9 Message-Id: <20240214150617.78548385E004@sourceware.org> Date: Wed, 14 Feb 2024 15:06:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=15d1674cae644619d521af249b3a4f1c17cdcee9 commit 15d1674cae644619d521af249b3a4f1c17cdcee9 Author: Szabolcs Nagy 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