Problem with reloading in a new backend...
Jim Wilson
wilson@tuliptree.org
Fri Apr 11 22:29:00 GMT 2008
On Sat, 2008-04-12 at 00:06 +0200, Stelian Pop wrote:
> I will still have the problems with the fact that my indirect addressing
> doesn't allow displacements, no ? (so I would need to implement
> LEGITIMIZE_RELOAD_ADDRESS, in which I'll need a special reserved
> register to compute the full address by adding the base and the
> displacement). Or do you imply that I won't need this anymore ?
I didn't see an obvious explanation for your troubles here.
There are other targets like IA-64 that do not have base+offset
addressing modes. It should just work.
LEGITIMIZE_RELOAD_ADDRESS is a hack. It should never be necessary for
correct code generation, in theory, though I think there are some rare
corner cases where it may be required for correct results. Long term
this is something that should be fixed. Meanwhile, I can point out that
the IA-64 port does not define LEGITIMIZE_RELOAD_ADDRESS, and does not
have base+offset addressing modes, and it works.
IA-64 does have auto-increment addressing modes, but those shouldn't
matter here. Reload won't generate such addressing modes for a stack
slot reference.
Jim
More information about the Gcc
mailing list