Autoincrement addressing modes
Michael P. Hayes
michaelh@ongaonga.chch.cri.nz
Sat Feb 14 15:24:00 GMT 1998
Richard Henderson writes:
> On Thu, Feb 12, 1998 at 11:06:26AM +1300, Michael P. Hayes wrote:
> > I'm also wondering if it is worthwhile to describe the addressing
> > modes of a machine, using something like:
> >
> > (define_address
> > [(mem:SF (match_operand:SI 0 "base_register" "a"))]
> > ""
> > "*%0")
>
> I think this is a swell idea. I can see it as being particularly
> useful to use this kind of description to help auto-generate
> GO_IF_LEGITIMATE_ADDRESS and LEGITIMIZE_ADDRESS. As it is not a
> few ports lie to gcc about how addresses really work with -fpic,
> perhaps if it were easier to describe, ports would quite lying.
>
> Though I would get rid of the mem and add a name,
Yes, I agree. Initially I thought that it was necessary to specify
the mode that could be addressed (say to validate an offsettable
displacement), but this should be handled by the condition.
This condition could also test a global variable, memory_read, or some
such thing, to handle the assymetry of some machines where
autoincrements are OK for memory reads but not for memory writes.
More information about the Gcc
mailing list