RFD: More flexibility in defining addressing modes

Bernd Schmidt bernds_cb1@t-online.de
Fri Aug 19 09:20:00 GMT 2005


Ian Lance Taylor wrote:

> At this point, would it be easier to understand if we instead passed
> the complete address to the target in RTL, and the target in the one
> case returned the register class, and in the other checked the regno?

Well, you can have several registers in one address, and if you pass the 
whole thing to the backend it won't know which part to look at.

> It might even make sense to do something like
>     (define_address
>      (plus (match_operand:Pmode 0 "predicate" "constraints")
>            (match_operand:Pmode 1 "predicate" "constraints")))

I know.  I got as far as parsing define_address in a few generator programs.

> Then we can use that instead of GO_IF_LEGITIMATE_ADDRESS,
> MODE_BASE_REG_REG_CLASS, etc., etc.

What would we generate from that?  To be worthwhile, it would have to be 
more descriptive than what we have now.  Do we want to generate versions 
of find_reloads or record_address_regs automatically?

> That is obviously a huge amount of work, though.

...which is why I took the easy way out.


Bernd



More information about the Gcc-patches mailing list