aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/final.c4
-rw-r--r--gcc/reload1.c8
3 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 419e698..95510a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr>
+ PR optimization/13041
+ * final.c (frame_pointer_needed): Fix comment.
+ * reload1.c (reload): Decrease alignment of the frame
+ pointer if it was used for register allocation.
+
+2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr>
+
PR target/12900
* reg-stack (move_for_stack_reg): New prototype. Return
whether a control flow insn was deleted.
diff --git a/gcc/final.c b/gcc/final.c
index f8750e9..fe3ff6e 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -171,8 +171,8 @@ CC_STATUS cc_prev_status;
char regs_ever_live[FIRST_PSEUDO_REGISTER];
/* Nonzero means current function must be given a frame pointer.
- Set in stmt.c if anything is allocated on the stack there.
- Set in reload1.c if anything is allocated on the stack there. */
+ Initialized in function.c to 0. Set only in reload1.c as per
+ the needs of the function. */
int frame_pointer_needed;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 22c0342..64dc0be 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1241,6 +1241,14 @@ reload (rtx first, int global)
by this, so unshare everything here. */
unshare_all_rtl_again (first);
+#ifdef STACK_BOUNDARY
+ /* init_emit has set the alignment of the hard frame pointer
+ to STACK_BOUNDARY. It is very likely no longer valid if
+ the hard frame pointer was used for register allocation. */
+ if (!frame_pointer_needed)
+ REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT;
+#endif
+
return failure;
}