Zack Weinberg <[EMAIL PROTECTED]> writes:
> I have worked out a tentative plan for replacing most of these macros
> with ordinary target hooks, and eliminating REG_OK_STRICT.  I propose
> to change GO_IF_LEGITIMATE_ADDRESS, GO_IF_MODE_DEPENDENT_ADDRESS,
> LEGITIMIZE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS, REG_OK_FOR_BASE_P,
> REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P,
> REG_OK_FOR_INDEX_P, CONSTANT_ADDRESS_P, FIND_BASE_TERM, and
> LEGITIMATE_CONSTANT_P.  The other macros in this section are all
> numeric constants and in at least one case are used to size static
> arrays, so conversion to hooks doesn't make sense (yet).

Maybe this is going off at too much of a tangent, but I've often thought
it would be nice to combine some of these macros.  For example, rather
than replace both GO_IF_LEGITIMATE_ADDRESS and GO_IF_MODE_DEPENDENT_
ADDRESS with new target hooks, why not have a single target hook in
which a mode argument of VOIDmode means "valid for all modes"?  A change
like that should help to reduce code duplication in backends and ought
to fit in with the step-by-step transition.

Richard

Reply via email to