This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Porting question: legitimate address


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]