This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Porting question: legitimate address
- From: Michael Meissner <gcc-mail at the-meissners dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 15 Jul 2003 13:12:45 -0400
- Subject: Re: Porting question: legitimate address
- References: <oprscuuds6cuup6n@store>
On Tue, Jul 15, 2003 at 04:07:15PM +0200, Anders Ådland wrote:
> In my port, I'm defining if an addresses is legal or not. (using
> CONSTANT_ADDRESS_P(), GO_IF_LEGITIMATE_ADDRESS() ...) A legal address is
> needed when loading and storing from memory, but also when doing a call or
> jump. Is there a way to treat these cases differently?
Generally what you need to do is use a different predicate and constraints for
the branch & call operators than you use for other memory operations. For
example, on the d30v, calls and branches can either take an address or a single
register, while loads and stores take register + offset or register + registger
addressing.
--
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org