diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-11-27 07:45:25 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-11-27 06:45:25 +0000 |
commit | b483cfb7a714d1d4ca0868241f69b31d44c51e55 (patch) | |
tree | 5ee4068a1e45d473e12e2bc01e5182b2bc83fcd5 | |
parent | ecb63641ffab9d9e808620c2f6b68ec08e188cfa (diff) | |
download | gcc-b483cfb7a714d1d4ca0868241f69b31d44c51e55.zip gcc-b483cfb7a714d1d4ca0868241f69b31d44c51e55.tar.gz gcc-b483cfb7a714d1d4ca0868241f69b31d44c51e55.tar.bz2 |
re PR rtl-optimization/13041 (linux-2.6/sound/core/oss/rate.c miscompiled)
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.
From-SVN: r73978
-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 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; } |