diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-03-03 15:04:02 +0000 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gcc.gnu.org> | 2015-03-03 15:04:02 +0000 |
commit | 2e612c470d9deead7b4d8b6042ac1b711c818766 (patch) | |
tree | 7f59cfef10ac3781fc4d997331364492938faf6f /gcc/builtins.c | |
parent | 9dd44d1c8021214d55491aefebe04d8647cae9d0 (diff) | |
download | gcc-2e612c470d9deead7b4d8b6042ac1b711c818766.zip gcc-2e612c470d9deead7b4d8b6042ac1b711c818766.tar.gz gcc-2e612c470d9deead7b4d8b6042ac1b711c818766.tar.bz2 |
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 <jcmvbkbc@gmail.com>
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
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index fb871e6..9263777 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -802,10 +802,8 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count) register. There is no way to access it off of the current frame pointer, but it can be accessed off the previous frame pointer by reading the value from the register window save area. */ -#ifdef RETURN_ADDR_IN_PREVIOUS_FRAME - if (fndecl_code == BUILT_IN_RETURN_ADDRESS) + if (RETURN_ADDR_IN_PREVIOUS_FRAME && fndecl_code == BUILT_IN_RETURN_ADDRESS) count--; -#endif /* Scan back COUNT frames to the specified frame. */ for (i = 0; i < count; i++) |