Commit b483cfb7 by Eric Botcazou Committed by Eric Botcazou

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
parent ecb63641
2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr> 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 PR target/12900
* reg-stack (move_for_stack_reg): New prototype. Return * reg-stack (move_for_stack_reg): New prototype. Return
whether a control flow insn was deleted. whether a control flow insn was deleted.
......
...@@ -171,8 +171,8 @@ CC_STATUS cc_prev_status; ...@@ -171,8 +171,8 @@ CC_STATUS cc_prev_status;
char regs_ever_live[FIRST_PSEUDO_REGISTER]; char regs_ever_live[FIRST_PSEUDO_REGISTER];
/* Nonzero means current function must be given a frame pointer. /* Nonzero means current function must be given a frame pointer.
Set in stmt.c if anything is allocated on the stack there. Initialized in function.c to 0. Set only in reload1.c as per
Set in reload1.c if anything is allocated on the stack there. */ the needs of the function. */
int frame_pointer_needed; int frame_pointer_needed;
......
...@@ -1241,6 +1241,14 @@ reload (rtx first, int global) ...@@ -1241,6 +1241,14 @@ reload (rtx first, int global)
by this, so unshare everything here. */ by this, so unshare everything here. */
unshare_all_rtl_again (first); 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; return failure;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment