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 8B5E7385C33F for ; Fri, 1 Jul 2022 14:26:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B5E7385C33F 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 72C11113E; Fri, 1 Jul 2022 07:26:08 -0700 (PDT) Received: from [10.2.78.56] (unknown [10.2.78.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 54E233F792; Fri, 1 Jul 2022 07:26:07 -0700 (PDT) Message-ID: Date: Fri, 1 Jul 2022 15:26:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 5/12] arm: Implement target feature macros for PACBTI Content-Language: en-GB To: Andrea Corallo , Andrea Corallo via Gcc-patches Cc: Richard Earnshaw , nd References: From: Richard Earnshaw In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3490.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 01 Jul 2022 14:26:10 -0000 On 28/04/2022 10:42, Andrea Corallo via Gcc-patches wrote: > This patch implements target feature macros when PACBTI is enabled > through the -march option or -mbranch-protection. The target feature > macros __ARM_FEATURE_PAC_DEFAULT and __ARM_FEATURE_BTI_DEFAULT are > specified in ARM ACLE > > __ARM_FEATURE_PAUTH and __ARM_FEATURE_BTI are specified in the > pull-request . > > Approved here > . > > gcc/ChangeLog: > > * config/arm/arm-c.c (arm_cpu_builtins): Define > __ARM_FEATURE_BTI_DEFAULT, __ARM_FEATURE_PAC_DEFAULT, > __ARM_FEATURE_PAUTH and __ARM_FEATURE_BTI. This bit is OK. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/acle/pacbti-m-predef-2.c: New test. > * gcc.target/arm/acle/pacbti-m-predef-4.c: New test. > * gcc.target/arm/acle/pacbti-m-predef-5.c: New test. > These are all execution tests. I think we also need some compile-only tests so that we get better coverage when the target does not directly support PACBTI. We also need some tests for the defines when targetting armv8-m.main and some tests for checking __ARM_FEATURE_BTI and __ARM_FEATURE_PAC (the tests here check only the '..._DEFAULT' macros. > Co-Authored-By: Tejas Belagod > R.