|
|
4ac4fd |
2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr>
|
|
|
4ac4fd |
|
|
|
4ac4fd |
PR optimization/13041
|
|
|
4ac4fd |
* final.c (frame_pointer_needed): Fix comment.
|
|
|
4ac4fd |
* reload1.c (reload): Decrease alignment of the frame
|
|
|
4ac4fd |
pointer if it was used for register allocation.
|
|
|
4ac4fd |
|
|
|
4ac4fd |
--- gcc/final.c 1 Nov 2003 00:48:50 -0000 1.294
|
|
|
4ac4fd |
+++ gcc/final.c 27 Nov 2003 06:45:24 -0000 1.295
|
|
|
4ac4fd |
@@ -171,8 +171,8 @@ CC_STATUS cc_prev_status;
|
|
|
4ac4fd |
char regs_ever_live[FIRST_PSEUDO_REGISTER];
|
|
|
4ac4fd |
|
|
|
4ac4fd |
/* Nonzero means current function must be given a frame pointer.
|
|
|
4ac4fd |
- Set in stmt.c if anything is allocated on the stack there.
|
|
|
4ac4fd |
- Set in reload1.c if anything is allocated on the stack there. */
|
|
|
4ac4fd |
+ Initialized in function.c to 0. Set only in reload1.c as per
|
|
|
4ac4fd |
+ the needs of the function. */
|
|
|
4ac4fd |
|
|
|
4ac4fd |
int frame_pointer_needed;
|
|
|
4ac4fd |
|
|
|
4ac4fd |
--- gcc/reload1.c 21 Nov 2003 05:49:05 -0000 1.413
|
|
|
4ac4fd |
+++ gcc/reload1.c 27 Nov 2003 06:45:25 -0000 1.414
|
|
|
4ac4fd |
@@ -1241,6 +1241,14 @@ reload (rtx first, int global)
|
|
|
4ac4fd |
by this, so unshare everything here. */
|
|
|
4ac4fd |
unshare_all_rtl_again (first);
|
|
|
4ac4fd |
|
|
|
4ac4fd |
+#ifdef STACK_BOUNDARY
|
|
|
4ac4fd |
+ /* init_emit has set the alignment of the hard frame pointer
|
|
|
4ac4fd |
+ to STACK_BOUNDARY. It is very likely no longer valid if
|
|
|
4ac4fd |
+ the hard frame pointer was used for register allocation. */
|
|
|
4ac4fd |
+ if (!frame_pointer_needed)
|
|
|
4ac4fd |
+ REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT;
|
|
|
4ac4fd |
+#endif
|
|
|
4ac4fd |
+
|
|
|
4ac4fd |
return failure;
|
|
|
4ac4fd |
}
|
|
|
4ac4fd |
|