From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108666 invoked by alias); 3 Mar 2015 15:53:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 108657 invoked by uid 89); 3 Mar 2015 15:53:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f171.google.com Received: from mail-ob0-f171.google.com (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 03 Mar 2015 15:53:00 +0000 Received: by obcva8 with SMTP id va8so530777obc.11 for ; Tue, 03 Mar 2015 07:52:58 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.183.24.162 with SMTP id ij2mr23388829obd.18.1425397978647; Tue, 03 Mar 2015 07:52:58 -0800 (PST) Received: by 10.76.134.102 with HTTP; Tue, 3 Mar 2015 07:52:58 -0800 (PST) In-Reply-To: References: <1425364962-16436-1-git-send-email-jcmvbkbc@gmail.com> <54F5CA6A.5010909@redhat.com> Date: Tue, 03 Mar 2015 15:53:00 -0000 Message-ID: Subject: Re: [PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression From: "H.J. Lu" To: Max Filippov Cc: Richard Henderson , "gcc-patches@gcc.gnu.org" , Sterling Augustine , Joseph Myers , "David S. Miller" , Eric Botcazou Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00145.txt.bz2 On Tue, Mar 3, 2015 at 7:05 AM, Max Filippov wrote: > On Tue, Mar 3, 2015 at 5:51 PM, Richard Henderson wrote: >> On 03/02/2015 10:42 PM, Max Filippov wrote: >>> gcc/ >>> * builtins.c (expand_builtin_return_addr): Add >>> RETURN_ADDR_IN_PREVIOUS_FRAME to 'if' condition, remove >>> surrounding #ifdef. >>> * config/sparc/sparc.h (RETURN_ADDR_IN_PREVIOUS_FRAME): Change >>> definition to 1. >>> * config/xtensa/xtensa.h (RETURN_ADDR_IN_PREVIOUS_FRAME): >>> Likewise. >>> * defaults.h (RETURN_ADDR_IN_PREVIOUS_FRAME): Define to 0 if >>> undefined. >>> doc/tm.texi.in (RETURN_ADDR_IN_PREVIOUS_FRAME): Update >>> paragraph. >> >> Ok. > > Applied to trunk. Thanks! > I checked in this to fix bootstrap. -- H.J. --- Index: ChangeLog =================================================================== --- ChangeLog (revision 221150) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2015-03-03 H.J. Lu + + * doc/tm.texi: Regenerated. + 2015-03-03 Max Filippov * builtins.c (expand_builtin_return_addr): Add Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 221150) +++ doc/tm.texi (working copy) @@ -3045,7 +3045,7 @@ A C expression whose value is RTL repres address for the frame @var{count} steps up from the current frame, after the prologue. @var{frameaddr} is the frame pointer of the @var{count} frame, or the frame pointer of the @var{count} @minus{} 1 frame if -@code{RETURN_ADDR_IN_PREVIOUS_FRAME} is defined. +@code{RETURN_ADDR_IN_PREVIOUS_FRAME} is nonzero. The value of the expression must always be the correct address when @var{count} is zero, but may be @code{NULL_RTX} if there is no way to @@ -3053,8 +3053,9 @@ determine the return address of other fr @end defmac @defmac RETURN_ADDR_IN_PREVIOUS_FRAME -Define this if the return address of a particular stack frame is accessed -from the frame pointer of the previous stack frame. +Define this macro to nonzero value if the return address of a particular +stack frame is accessed from the frame pointer of the previous stack +frame. The zero default for this macro is suitable for most ports. @end defmac @defmac INCOMING_RETURN_ADDR_RTX