This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Max Filippov <jcmvbkbc at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Sterling Augustine <augustine dot sterling at gmail dot com>, Joseph Myers <joseph at codesourcery dot com>, "David S. Miller" <davem at redhat dot com>, Eric Botcazou <ebotcazou at libertysurf dot fr>
- Date: Tue, 3 Mar 2015 07:52:58 -0800
- Subject: Re: [PATCH] Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression
- Authentication-results: sourceware.org; auth=none
- References: <1425364962-16436-1-git-send-email-jcmvbkbc at gmail dot com> <54F5CA6A dot 5010909 at redhat dot com> <CAMo8BfJs_actk-SDbF3fjwdj5349TxK-5tTXUNO=HiZAogXHwg at mail dot gmail dot com>
On Tue, Mar 3, 2015 at 7:05 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Tue, Mar 3, 2015 at 5:51 PM, Richard Henderson <rth@redhat.com> 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 <hongjiu.lu@intel.com>
+
+ * doc/tm.texi: Regenerated.
+
2015-03-03 Max Filippov <jcmvbkbc@gmail.com>
* 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