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 CAE6E3845855 for ; Wed, 14 Dec 2022 16:45:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CAE6E3845855 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com 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 D8D6FFEC; Wed, 14 Dec 2022 08:45:53 -0800 (PST) Received: from [10.57.11.95] (unknown [10.57.11.95]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 658003F5A1; Wed, 14 Dec 2022 08:45:09 -0800 (PST) Message-ID: Date: Wed, 14 Dec 2022 16:45:05 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 10/15 V6] arm: Implement cortex-M return signing address codegen Content-Language: en-GB To: Andrea Corallo Cc: Andrea Corallo via Gcc-patches , Richard Earnshaw , nd References: <2d22c659-1452-6302-0dd0-270763510950@foss.arm.com> <9643aa03-b0d0-6c8b-c668-a1a6e5814c6e@foss.arm.com> From: Richard Earnshaw In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3489.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 14/12/2022 16:35, Andrea Corallo via Gcc-patches wrote: > Richard Earnshaw writes: > > [...] > >> >> + if (TARGET_TPCS_FRAME) >> + error ("Return address signing and %<-mtpcs-frame%> are >> incompatible."); >> >> So really this is 'not implemented' rather than not compatible - I >> don't see why we couldn't implement this if we really wanted to. It's >> not worth implementing it because tpcs-frames are very much legacy >> these days. >> >> So the message should use sorry() and say 'is not supported' rather >> than 'are incompatible'. >> >> +(define_insn "pacbti_nop" >> + [(set (reg:SI IP_REGNUM) >> + (unspec:SI [(reg:SI SP_REGNUM) (reg:SI LR_REGNUM)] >> + VUNSPEC_PACBTI_NOP))] >> >> No, this needs to be unspec_volatile, not unspec. >> >> +(define_insn "aut_nop" >> + [(unspec:SI [(reg:SI IP_REGNUM) (reg:SI SP_REGNUM) (reg:SI LR_REGNUM)] >> + VUNSPEC_AUT_NOP)] >> >> Similarly. >> >> R. > > > Hi Richard & all, > > please find attached the updated patch implementing suggestions. > > BR > > Andrea > + (unspec_volatile:SI [(reg:SI SP_REGNUM) (reg:SI LR_REGNUM)] + VUNSPEC_PACBTI_NOP))] Please fix the indentation of the VUNSPEC_... + [(unspec_volatile:SI [(reg:SI IP_REGNUM) (reg:SI SP_REGNUM) (reg:SI LR_REGNUM)] + VUNSPEC_AUT_NOP)] And here. Otherwise ok with that change. R.