From 2e612c470d9deead7b4d8b6042ac1b711c818766 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 3 Mar 2015 15:04:02 +0000 Subject: Turn RETURN_ADDR_IN_PREVIOUS_FRAME into C expression This allows a target to support both windowed and non-windowed ABI. 2015-03-03 Max Filippov 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. From-SVN: r221150 --- gcc/defaults.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/defaults.h') diff --git a/gcc/defaults.h b/gcc/defaults.h index 5cef92c..1d54798 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1095,6 +1095,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define FRAME_GROWS_DOWNWARD 0 #endif +#ifndef RETURN_ADDR_IN_PREVIOUS_FRAME +#define RETURN_ADDR_IN_PREVIOUS_FRAME 0 +#endif + /* On most machines, the CFA coincides with the first incoming parm. */ #ifndef ARG_POINTER_CFA_OFFSET #define ARG_POINTER_CFA_OFFSET(FNDECL) \ -- cgit v1.1