This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with reloading in a new backend...
Le mercredi 09 avril 2008 Ã 21:19 +0200, Stelian Pop a Ãcrit :
> > You might need to define LEGITIMIZE_RELOAD_ADDRESS, or at least
> > LEGITIMIZE_ADDRESS. I don't know if reload has assumptions about such
> > offsets, but the m32c port has a limit on the offset range so it might
> > help you figure out your port.
>
> Ah, this looks exactly like what I needed, thanks!
>
> I'll try this and come back afterwards.
Ok, I tried.
Since displacements are not allowed in my addressing mode, I need to
replace:
(mem (plus (reg X) (const_int Y)))
into
(set (reg Z) (const_int Y))
(set (reg Z) (plus (reg Z) (reg X)))
(mem (reg Z)
This means I need to create a new pseodo register. This is allowed in
LEGITIMIZE_ADDRESS but not in LEGITIMIZE_RELOAD_ADDRESS...
Is there a way to do this ?
Maybe I should reserve a special register for this usage (say r0). But
maybe there is a better solution...
Thanks,
--
Stelian Pop <stelian@popies.net>