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 954073858D39 for ; Fri, 1 Jul 2022 10:49:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 954073858D39 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 7FDAC113E; Fri, 1 Jul 2022 03:49:53 -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 4454A3F66F; Fri, 1 Jul 2022 03:49:52 -0700 (PDT) Message-ID: <3e2f8ff9-ddfc-a829-fa32-b7699412415d@foss.arm.com> Date: Fri, 1 Jul 2022 11:49:50 +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 1/12] arm: Make mbranch-protection opts parsing common to AArch32/64 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.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, 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 10:49:56 -0000 On 28/04/2022 10:08, Andrea Corallo via Gcc-patches wrote: > Hi all, > > This change refactors all the mbranch-protection option parsing code and > types to make it common to both AArch32 and AArch64 backends. > > This change also pulls in some supporting types from AArch64 to make > it common (aarch_parse_opt_result). > > The significant changes in this patch are the movement of all branch > protection parsing routines from aarch64.c to aarch-common.c and > supporting data types and static data structures. > > This patch also pre-declares variables and types required in the > aarch32 back-end for moved variables for function sign scope and key > to prepare for the impending series of patches that support parsing > the feature mbranch-protection in the aarch32 back-end. > > This patch implements the changes requested and was pre-approved here > . > > gcc/ChangeLog: > > * common/config/aarch64/aarch64-common.cc: Include aarch-common.h. > (all_architectures): Fix comment. > (aarch64_parse_extension): Rename return type, enum value names. > * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Rename > factored out aarch_ra_sign_scope and aarch_ra_sign_key variables. > Also rename corresponding enum values. > * config/aarch64/aarch64-opts.h (aarch64_function_type): Factor > out aarch64_function_type and move it to common code as > aarch_function_type in aarch-common.h. > * config/aarch64/aarch64-protos.h: Include common types header, > move out types aarch64_parse_opt_result and aarch64_key_type to > aarch-common.h > * config/aarch64/aarch64.cc: Move mbranch-protection parsing types > and functions out into aarch-common.h and aarch-common.cc. Fix up > all the name changes resulting from the move. > * config/aarch64/aarch64.md: Fix up aarch64_ra_sign_key type name change > and enum value. > * config/aarch64/aarch64.opt: Include aarch-common.h to import > type move. Fix up name changes from factoring out common code and > data. > * config/arm/aarch-common-protos.h: Export factored out routines to both > backends. > * config/arm/aarch-common.cc: Include newly factored out types. Move all > mbranch-protection code and data structures from aarch64.cc. > * config/arm/aarch-common.h: New header that declares types shared > between aarch32 and aarch64 backends. > * config/arm/arm-protos.h: Declare types and variables that are > made common to aarch64 and aarch32 backends - aarch_ra_sign_key, > aarch_ra_sign_scope and aarch_enable_bti. > > Co-Authored-By: Tejas Belagod > OK, but please wait for the rest of this series to be approved before applying. R.