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 2E5A9385381C for ; Fri, 21 Oct 2022 12:30:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E5A9385381C 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 240781042; Fri, 21 Oct 2022 05:30:17 -0700 (PDT) Received: from [10.57.35.253] (unknown [10.57.35.253]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD6203F792; Fri, 21 Oct 2022 05:30:09 -0700 (PDT) Message-ID: Date: Fri, 21 Oct 2022 13:30:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 9/15] arm: Set again stack pointer as CFA reg when popping if necessary Content-Language: en-GB To: Kyrylo Tkachov , Andrea Corallo Cc: Richard Earnshaw , nd , Andrea Corallo via Gcc-patches 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.4 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,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 27/09/2022 16:24, Kyrylo Tkachov via Gcc-patches wrote: > > >> -----Original Message----- >> From: Andrea Corallo >> Sent: Tuesday, September 27, 2022 11:06 AM >> To: Kyrylo Tkachov >> Cc: Andrea Corallo via Gcc-patches ; Richard >> Earnshaw ; nd >> Subject: Re: [PATCH 9/15] arm: Set again stack pointer as CFA reg when >> popping if necessary >> >> Kyrylo Tkachov writes: >> >>> Hi Andrea, >>> >>>> -----Original Message----- >>>> From: Gcc-patches >>> bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Andrea >>>> Corallo via Gcc-patches >>>> Sent: Friday, August 12, 2022 4:34 PM >>>> To: Andrea Corallo via Gcc-patches >>>> Cc: Richard Earnshaw ; nd >>>> Subject: [PATCH 9/15] arm: Set again stack pointer as CFA reg when >> popping >>>> if necessary >>>> >>>> Hi all, >>>> >>>> this patch enables 'arm_emit_multi_reg_pop' to set again the stack >>>> pointer as CFA reg when popping if this is necessary. >>>> >>> >>> From what I can tell from similar functions this is correct, but could you >> elaborate on why this change is needed for my understanding please? >>> Thanks, >>> Kyrill >> >> Hi Kyrill, >> >> sure, if the frame pointer was set, than it is the current CFA register. >> If we request to adjust the current CFA register offset indicating it >> being SP (while it's actually FP) that is indeed not correct and the >> incoherence we will be detected by an assertion in the dwarf emission >> machinery. > > Thanks, the patch is ok > Kyrill > >> >> Best Regards >> >> Andrea Hmm, wait. Why would a multi-reg pop be updating the stack pointer? Please can you show a code sequence where this is needed. R.