From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id DC0403864830; Wed, 10 Apr 2024 10:49:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC0403864830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712746154; bh=hLh2qqxSgoAp35dIuLFZOzK8bdohPsaI8iBICYHAEIU=; h=From:To:Subject:Date:From; b=RkX/P8QnvyPjmubYd86vhR9JGywD2KeczBBiDr/0ILxQ1XNXknhJaS69LI6DwsXL8 FX9l91AnfrJrNJDxg+r5DOMkmHoRAi3REVE7QBAuSsZYi9p4xK88pfEfNSWKCdtmCE j0BxuQn5rtR4BmT1kjeZZZISU1RvRzMKAi/uV09Y= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/gcs)] aarch64: libatomic: add GCS marking to asm X-Act-Checkin: gcc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/vendors/ARM/heads/gcs X-Git-Oldrev: b32a17f9f43d68859e31d7a6af7b21ac2ed42742 X-Git-Newrev: 78b29b5934193bd7e057aa8196ab8645df092d44 Message-Id: <20240410104914.DC0403864830@sourceware.org> Date: Wed, 10 Apr 2024 10:49:14 +0000 (GMT) List-Id: https://gcc.gnu.org/g:78b29b5934193bd7e057aa8196ab8645df092d44 commit 78b29b5934193bd7e057aa8196ab8645df092d44 Author: Szabolcs Nagy Date: Fri Dec 22 15:11:25 2023 +0000 aarch64: libatomic: add GCS marking to asm libatomic/ChangeLog: * config/linux/aarch64/atomic_16.S (FEATURE_1_GCS): Define. (GCS_FLAG): Define if GCS is enabled. (GNU_PROPERTY): Add GCS_FLAG. Diff: --- libatomic/config/linux/aarch64/atomic_16.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libatomic/config/linux/aarch64/atomic_16.S b/libatomic/config/linux/aarch64/atomic_16.S index 4e3fa870b03..d6f34eee146 100644 --- a/libatomic/config/linux/aarch64/atomic_16.S +++ b/libatomic/config/linux/aarch64/atomic_16.S @@ -790,6 +790,7 @@ ALIAS2 (test_and_set_16) #define FEATURE_1_AND 0xc0000000 #define FEATURE_1_BTI 1 #define FEATURE_1_PAC 2 +#define FEATURE_1_GCS 4 /* Supported features based on the code generation options. */ #if defined(__ARM_FEATURE_BTI_DEFAULT) @@ -804,6 +805,12 @@ ALIAS2 (test_and_set_16) # define PAC_FLAG 0 #endif +#if __ARM_FEATURE_GCS_DEFAULT +# define GCS_FLAG FEATURE_1_GCS +#else +# define GCS_FLAG 0 +#endif + /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ #define GNU_PROPERTY(type, value) \ .section .note.gnu.property, "a"; \ @@ -821,7 +828,7 @@ ALIAS2 (test_and_set_16) .section .note.GNU-stack, "", %progbits /* Add GNU property note if built with branch protection. */ -# if (BTI_FLAG|PAC_FLAG) != 0 -GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG) +# if (BTI_FLAG|PAC_FLAG|GCS_FLAG) != 0 +GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG|GCS_FLAG) # endif #endif