"Matt Lee" <[EMAIL PROTECTED]> writes:

> Is it possible for me to write a backend that accepts certain
> addressing modes for loads, while rejecting them for stores? I am not
> sure how to do this with the GO_IF_LEGITIMATE_ADDRESS macro. I know
> that this is not very sane, but the situation has arisen neverthless.
> I want to allow only indexed addressing on stores, while allowing
> immediate forms of addressing with loads.

As far as I know there is no good way to do with the current
infrastructure.  Certainly GO_IF_LEGITIMATE_ADDRESS won't help.

The best I know how to do is use different constraint characters for
loads and stores, and recognize them differently in the insn patterns.
You will want the movsi (or whatever) expander to pick the right
forms.  The main drawback with this approach is that you can land in
reload hell, from which I believe the only escape is to implement
appropriate secondary reloads for hideous screwed up conditions.  I
was able to get something similar working for a DSP backend I
implemented,

Ian

Reply via email to