Commit a8a6b3df by Trevor Saunders Committed by Trevor Saunders

provide default for RETURN_ADDR_OFFSET

gcc/ChangeLog:

2015-04-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (RETURN_ADDR_OFFSET): New definition.
	* except.c (expand_builtin_extract_return_addr): Remove ifdef
	RETURN_ADDR_OFFSET.
	(expand_builtin_frob_return_addr): Likewise.

From-SVN: r222298
parent 058eb3b0
2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* defaults.h (RETURN_ADDR_OFFSET): New definition.
* except.c (expand_builtin_extract_return_addr): Remove ifdef
RETURN_ADDR_OFFSET.
(expand_builtin_frob_return_addr): Likewise.
2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfgrtl.c (rtl_merge_blocks): Change #if HAVE_cc0 to if (HAVE_cc0) * cfgrtl.c (rtl_merge_blocks): Change #if HAVE_cc0 to if (HAVE_cc0)
(try_redirect_by_replacing_jump): Likewise. (try_redirect_by_replacing_jump): Likewise.
(rtl_tidy_fallthru_edge): Likewise. (rtl_tidy_fallthru_edge): Likewise.
......
...@@ -383,6 +383,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -383,6 +383,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM #define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
#endif #endif
/* Offset between the eh handler address and entry in eh tables. */
#ifndef RETURN_ADDR_OFFSET
#define RETURN_ADDR_OFFSET 0
#endif
/* If we have named section and we support weak symbols, then use the /* If we have named section and we support weak symbols, then use the
.jcr section for recording java classes which need to be registered .jcr section for recording java classes which need to be registered
at program start-up time. */ at program start-up time. */
......
...@@ -2190,9 +2190,8 @@ expand_builtin_extract_return_addr (tree addr_tree) ...@@ -2190,9 +2190,8 @@ expand_builtin_extract_return_addr (tree addr_tree)
#endif #endif
/* Then adjust to find the real return address. */ /* Then adjust to find the real return address. */
#if defined (RETURN_ADDR_OFFSET) if (RETURN_ADDR_OFFSET)
addr = plus_constant (Pmode, addr, RETURN_ADDR_OFFSET); addr = plus_constant (Pmode, addr, RETURN_ADDR_OFFSET);
#endif
return addr; return addr;
} }
...@@ -2208,10 +2207,11 @@ expand_builtin_frob_return_addr (tree addr_tree) ...@@ -2208,10 +2207,11 @@ expand_builtin_frob_return_addr (tree addr_tree)
addr = convert_memory_address (Pmode, addr); addr = convert_memory_address (Pmode, addr);
#ifdef RETURN_ADDR_OFFSET if (RETURN_ADDR_OFFSET)
addr = force_reg (Pmode, addr); {
addr = plus_constant (Pmode, addr, -RETURN_ADDR_OFFSET); addr = force_reg (Pmode, addr);
#endif addr = plus_constant (Pmode, addr, -RETURN_ADDR_OFFSET);
}
return addr; return addr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment