This is the mail archive of the 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: Avoiding REG+OFF memory accesses

Ian suggestion worked perfectly, thanks. Can you tell me the macro/function name to look up
to work out the secondary reload you're mentioning?

----- Original Message ----
From: Michael Meissner <>
To: Ian Lance Taylor <>
Cc: Iceman <>;
Sent: Friday, May 8, 2009 11:47:43 AM
Subject: Re: Avoiding REG+OFF memory accesses

On Wed, May 06, 2009 at 05:01:33PM -0700, Ian Lance Taylor wrote:
> Iceman <> writes:
> > Sorry for such trivial question, but is there any macro that can be used to avoig GCC to generate
> > REG+OFF memory accesses?
> > So basically to force GCC to break:
> >
> > (mem (plus (reg const_int)))
> >
> > into
> >
> > (set regtmp (plus (reg const_int)))
> > (set (mem regtmp) reg)
> >
> > This w/out writing custom RTL.
> Assuming this is a private port, this should happen more or less
> automatically if GO_IF_LEGITIMATE_ADDRESS rejects register plus offset
> addressing.
> If that is not what you are looking for, I think you need to provide
> some more context.

And you may also need to provide secondary reload support as well to convert
spill addresses into just REG addresses.

Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA


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