From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 72F8D3857C56 for ; Fri, 10 Dec 2021 16:51:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72F8D3857C56 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25DD1106F; Fri, 10 Dec 2021 08:51:14 -0800 (PST) Received: from [10.57.0.71] (unknown [10.57.0.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5AA753F73B; Fri, 10 Dec 2021 08:51:13 -0800 (PST) Subject: Re: [Patch 7/8 V2] Arm: Emit build attributes for PACBTI target feature. To: Andrea Corallo , Richard Earnshaw via Gcc-patches Cc: Tejas Belagod , Richard Earnshaw References: <5ee84862-83fe-6629-9022-f6018e374f2d@foss.arm.com> From: Richard Earnshaw Message-ID: <23bebfe0-1216-d137-9c6f-296047d0c609@foss.arm.com> Date: Fri, 10 Dec 2021 16:51:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3497.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2021 16:51:16 -0000 On 10/12/2021 16:36, Andrea Corallo via Gcc-patches wrote: > Richard Earnshaw via Gcc-patches writes: > >> On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote: >>> >>>> -----Original Message----- >>>> From: Gcc-patches >>> bounces+belagod=gcc.gnu.org@gcc.gnu.org> On Behalf Of Tejas Belagod via >>>> Gcc-patches >>>> Sent: Friday, October 8, 2021 1:19 PM >>>> To: gcc-patches@gcc.gnu.org >>>> Subject: [Patch 6/7, Arm, GCC] Emit build attributes for PACBTI target >>>> feature. >>>> >>>> Hi, >>>> >>>> This patch emits assembler directives for PACBTI build attributes as defined >>>> by the ABI. (https://github.com/ARM-software/abi- >>>> aa/releases/download/2021Q1/addenda32.pdf) >>>> >>>> Tested on arm-none-eabi. >>>> >>>> 2021-10-04 Tejas Belagod >>>> >>>> gcc/ChangeLog: >>>> >>>> * config/arm/arm.c (arm_file_start): Emit EABI attributes for >>>> Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use, >>>> TAG_PACRET_use. >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> * gcc.target/arm/acle/pacbti-m-predef-1.c: New test. >>>> * gcc.target/arm/acle/pacbti-m-predef-3: New test. >>>> * gcc.target/arm/acle/pacbti-m-predef-6.c: New test. >>> This patch emits assembler directives for PACBTI build attributes >>> as defined by the ABI. >>> https://github.com/ARM-software/abi-aa/releases/download/2021Q1/addenda32.pdf >>> 2021-10-25 Tejas Belagod >>> gcc/ChangeLog: >>> * config/arm/arm.c (arm_file_start): Emit EABI attributes for >>> Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use, TAG_PACRET_use. >>> gcc/testsuite/ChangeLog: >>> * gcc.target/arm/acle/pacbti-m-predef-1.c: New test. >>> * gcc.target/arm/acle/pacbti-m-predef-3: New test. >>> * gcc.target/arm/acle/pacbti-m-predef-6.c: New test. >> >> I'm not sure what the value of making these executable tests is. It >> means that they can only be used when the test model has PAC/BTI >> available. But they don't really test the PAC/BTI generation, so that >> seems rather pointless. >> >> Better, IMO to make them simple compile/scan-assembler tests that >> check the build attributes are correct. >> >> R. > > Hi Richard, > > agreed. Please find attached the updated version of the patch. > > Thanks for reviewing > > Andrea > Oh, another one: diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c new file mode 100644 index 00000000000..bdf9131c142 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c @@ -0,0 +1,16 @@ +#if defined (__ARM_FEATURE_BTI_DEFAULT) +#error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined." +#endif + +#if defined (__ARM_FEATURE_PAC_DEFAULT) +#error "Feature test macro __ARM_FEATURE_PAC_DEFAULT should be undefined." +#endif Shouldn't the first error message be 'undefined'?