This is the mail archive of the gcc@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]

Re: scratch registers for peephole2


On Fri, Jan 05, 2001 at 07:56:52PM +0000, Richard Earnshaw wrote:
> I've deleted the original mail, but I seem to recall that the AVR port was 
> having problems with scratch registers being used in peephole2 that were 
> not unsafe.  Looking at the code in recog.c, it would appear that there is 
> potentially a similar problem on the ARM with the return register (which 
> is treated as a call-clobbered reg, but can contain real data).
> 
> Shouldn't there be a MD macro in that code that specifies that the 
> register is safe to use, something like

Maybe, but your problem on arm with the return register is not,
repeat NOT here.  It is that you havn't represented that the
register is live either through rtl or through EPILOGUE_USES.

Correct this representation mistake and you fix peep2 and the
register renamer simultaneously.

When I get some more free time I'll continue working on my
patch to replace (return) with (return <addr>), which will
force each port to properly address this issue.


r~

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