diff options
| author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-27 06:45:25 +0000 |
|---|---|---|
| committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-27 06:45:25 +0000 |
| commit | 23d75d32f1390ef02a2c8288ab5f048a5c233020 (patch) | |
| tree | 5ee4068a1e45d473e12e2bc01e5182b2bc83fcd5 | |
| parent | 393522dfc5520b0efecd715e5daed63eee920e57 (diff) | |
| download | ppe42-gcc-23d75d32f1390ef02a2c8288ab5f048a5c233020.tar.gz ppe42-gcc-23d75d32f1390ef02a2c8288ab5f048a5c233020.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73978 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/final.c | 4 | ||||
| -rw-r--r-- | gcc/reload1.c | 8 |
3 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 419e698e57c..95510a02fef 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 f8750e98872..fe3ff6eeff4 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 22c03421a01..64dc0be4bf4 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; } |

