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
This commit is contained in:
Eric Botcazou 2003-11-27 07:45:25 +01:00 committed by Eric Botcazou
parent ecb63641ff
commit b483cfb7a7
3 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -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;

View File

@ -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;
}