aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel1@de.ibm.com>2005-02-17 21:09:23 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2005-02-17 21:09:23 +0000
commitc6d010797f94f33e5c012334096bcff30ed83b04 (patch)
treec5957feb8d6a2c09259a5ac5db59b14bd8b33815 /gcc/builtins.c
parent7b210806753f58281323b6cc4a05f1ee4f5e19dc (diff)
downloadgcc-c6d010797f94f33e5c012334096bcff30ed83b04.zip
gcc-c6d010797f94f33e5c012334096bcff30ed83b04.tar.gz
gcc-c6d010797f94f33e5c012334096bcff30ed83b04.tar.bz2
builtins.c (expand_builtin_return_addr): Remove tem parameter.
2005-02-17 Andreas Krebbel <krebbel1@de.ibm.com> * builtins.c (expand_builtin_return_addr): Remove tem parameter. tem becomes a local variable which is set to the value of the back end defined INITIAL_FRAME_ADDRESS macro. (expand_builtin_frame_address): Omit the base parameter to expand_builtin_return_addr. (expand_builtin_profile_func): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Define new macro. (DYNAMIC_CHAIN_ADDRESS): Remove the case for the initial frame. * doc/tm.texi: Documentation for INITIAL_FRAME_ADDRESS_RTX added. From-SVN: r95194
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index e398019..c214ef7 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -453,11 +453,16 @@ builtin_save_expr (tree exp)
address located within it (depending on FNDECL_CODE). */
static rtx
-expand_builtin_return_addr (enum built_in_function fndecl_code, int count,
- rtx tem)
+expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
{
int i;
+#ifdef INITIAL_FRAME_ADDRESS_RTX
+ rtx tem = INITIAL_FRAME_ADDRESS_RTX;
+#else
+ rtx tem = hard_frame_pointer_rtx;
+#endif
+
/* Some machines need special handling before we can access
arbitrary frames. For example, on the sparc, we must first flush
all register windows to the stack. */
@@ -4221,8 +4226,7 @@ expand_builtin_frame_address (tree fndecl, tree arglist)
{
rtx tem
= expand_builtin_return_addr (DECL_FUNCTION_CODE (fndecl),
- tree_low_cst (TREE_VALUE (arglist), 1),
- hard_frame_pointer_rtx);
+ tree_low_cst (TREE_VALUE (arglist), 1));
/* Some ports cannot access arbitrary stack frames. */
if (tem == NULL)
@@ -4855,7 +4859,7 @@ expand_builtin_profile_func (bool exitp)
emit_library_call (which, LCT_NORMAL, VOIDmode, 2, this, Pmode,
expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS,
- 0, hard_frame_pointer_rtx),
+ 0),
Pmode);
return const0_rtx;