From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael P. Hayes" To: Richard Henderson Cc: "Michael P. Hayes" , egcs@cygnus.com Subject: Re: Autoincrement addressing modes Date: Sat, 14 Feb 1998 15:24:00 -0000 Message-id: <199802142326.MAA29262@ongaonga.chch.cri.nz> References: <199802112206.LAA28349@ongaonga.chch.cri.nz> <19980212023505.17080@dot.cygnus.com> X-SW-Source: 1998-02/msg00674.html 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.