This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: check reload_completed and frame_pointer_needed (Bug in simplify_subreg?)


Lars Brinkhoff <lars.spam@nocrew.org> writes:
>         * emit-rtl.c (gen_rtx_REG): 

Oops, again with ChangeLog entry:

2002-08-07  Lars Brinkhoff  <lars@nocrew.org>

	* emit-rtl.c (gen_rtx_REG): after reload_completed, only
	return frame_pointer_rtx if frame_pointer_needed.

Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.289
diff -u -r1.289 emit-rtl.c
--- emit-rtl.c	5 Aug 2002 18:46:32 -0000	1.289
+++ emit-rtl.c	7 Aug 2002 13:35:32 -0000
@@ -514,7 +514,8 @@
 
   if (mode == Pmode && !reload_in_progress)
     {
-      if (regno == FRAME_POINTER_REGNUM)
+      if (regno == FRAME_POINTER_REGNUM
+	  && (!reload_completed || frame_pointer_needed))
 	return frame_pointer_rtx;
 #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
       if (regno == HARD_FRAME_POINTER_REGNUM)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]