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][reload] Fix inheritance bug with register elimination


On Sun, May 06, 2007 at 06:21:58PM +0200, Rask Ingemann Lambertsen wrote:
> 2007-05-06  Rask Ingemann Lambertsen  <rask@sygehus.dk>
> 
> 	* reload1.c (break_reload_inheritance): New function.
> 	(elimination_effects): Use it when an elimination target
> 	changes to mark reloads from this register as invalid
> 	for inheritance.

   This doesn't work as intended because elimination_effects() is called
before emit_reload_insns(), where reg_reloaded_valid is set. An example from
newlib's bsearch(), first with frame pointer elimination:

movw    %sp,    %bx	;# 107  *movhi/1
pushw   22(%bx)		;# 38   *pushhi1_nonimm
movw    32(%bx),%dx	;# 108  *movhi/1
call    *%dx		;# 39   call_value

Without frame pointer elimination:

pushw   14(%bp)		;# 38   *pushhi1_nonimm
movw    22(%bp),%dx	;# 106  *movhi/1
call    *%dx		;# 39   call_value

   The difference between the offsets of the two movw insns should have been
the same as that of the two pushw insns. I'm working on a new patch.

-- 
Rask Ingemann Lambertsen


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