From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27410 invoked by alias); 22 Feb 2011 17:51:55 -0000 Received: (qmail 27402 invoked by uid 22791); 22 Feb 2011 17:51:54 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Feb 2011 17:51:52 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1MHpPhu007758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Feb 2011 12:51:25 -0500 Received: from anchor.twiddle.home (ovpn-113-147.phx2.redhat.com [10.3.113.147]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1MHpODT014087; Tue, 22 Feb 2011 12:51:24 -0500 Message-ID: <4D63F79C.5070002@redhat.com> Date: Tue, 22 Feb 2011 17:51:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: Anitha Boyapati CC: GCC Patches , =?ISO-8859-1?Q?Petr_Hluz=EDn?= , gdb@sourceware.org, chertykov@gmail.com, aesok@post.ru, eric.weddington@atmel.com Subject: Re: [avr] gas support for cfi info References: <4D5ABAB2.2000405@redhat.com> <4D5ACDF2.20904@redhat.com> <4D5C104D.7050707@redhat.com> <4D5D4712.8000405@redhat.com> <4D5D7C86.2080804@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00124.txt.bz2 On 02/22/2011 08:17 AM, Anitha Boyapati wrote: > Just to be on same page, these are the 2 places: > > 1. gen_enable_interrupt() > 2. gen_call_prologue_saves() > > > For the latter, can you explain why adding reg notes is required? > > + add_reg_note (insn, REG_CFA_ADJUST_CFA, > + gen_rtx_SET (VOIDmode, > + (frame_pointer_needed > + ? frame_pointer_rtx : stack_pointer_rtx), > + plus_constant (stack_pointer_rtx, > + -(size + live_seq)))); > + > > (The comment does say that this is to describe the effect of > UNSPEC_VOLATILE, but how reg notes help?) The external function call represented by the prologue_saves unspec saves registers to the stack, and allocates stack space. Both of these actions are things we want to describe in unwind info. The reg notes I added describe all of the actions performed by the function call. >> (2) At present it's possible to use epilogue_restores without >> having used prologue_saves. I.e. use epilogue_restores with >> an inline prologue. The problem being that the inline prologue >> uses an HImode push of REG_Y (i.e. r29 first), whereas the code >> in prologue_saves pushes r28 first and epilogue_restores is >> written to expect that. >> > > Is this is the line being referred to ? > > if (frame_pointer_needed) > { > ... > /* Push frame pointer. */ > insn = emit_move_insn (pushword, frame_pointer_rtx); Yes. r~