aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshinwell <shinwell@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-01 17:10:17 +0000
committershinwell <shinwell@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-01 17:10:17 +0000
commit29ed323e2901c6ecd1ac63822e4da84f32f2fec1 (patch)
treeb457f3897378de7ff917fd8cc860b2588f8ddee3
parenta3e6b41ac6482d665206929cf07923684e14a001 (diff)
Patch for issue #693.
* gcc/builtins.c (expand_builtin_return_addr): Always use hard_frame_pointer_rtx and prevent frame pointer elimination if INITIAL_FRAME_ADDRESS_RTX isn't set. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@114314 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl6
-rw-r--r--gcc/builtins.c20
2 files changed, 13 insertions, 13 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 4aa70e39bdd..8a507d4a7ed 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,11 @@
2006-06-01 Mark Shinwell <shinwell@codesourcery.com>
+ * gcc/builtins.c (expand_builtin_return_addr): Always use
+ hard_frame_pointer_rtx and prevent frame pointer elimination
+ if INITIAL_FRAME_ADDRESS_RTX isn't set.
+
+2006-06-01 Mark Shinwell <shinwell@codesourcery.com>
+
* gcc/tree.h: Declare folding_initializer.
* gcc/builtins.c (fold_builtin_constant_p): Give definite answer
if folding inside an initializer.
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3b2675ae311..2396b6df848 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -496,20 +496,14 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
#else
rtx tem;
- /* For a zero count, we don't care what frame address we return, so frame
- pointer elimination is OK, and using the soft frame pointer is OK.
- For a non-zero count, we require a stable offset from the current frame
- pointer to the previous one, so we must use the hard frame pointer, and
- we must disable frame pointer elimination. */
- if (count == 0)
- tem = frame_pointer_rtx;
- else
- {
- tem = hard_frame_pointer_rtx;
+ /* We require a stable offset from the current frame pointer to the
+ previous one, so we must use the hard frame pointer, and we must
+ disable frame pointer elimination. */
- /* Tell reload not to eliminate the frame pointer. */
- current_function_accesses_prior_frames = 1;
- }
+ tem = hard_frame_pointer_rtx;
+
+ /* Tell reload not to eliminate the frame pointer. */
+ current_function_accesses_prior_frames = 1;
#endif
/* Some machines need special handling before we can access