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: Question about GO_IF_LEGITIMIZE_ADDRESS


>>>>> Peter Barada writes:

Peter> Any suggestions for which character to use for this new
Peter> constraint(perhaps '@')?
>> 
>> GCC already has 'a'.  Is that what you mean?

Peter> Nope.  'a' is used to indicate that the value the operand (or what the
Peter> operand points at) goes into an address register.  If you have the
Peter> constraint string of "ma", then it indicates that that operand can
Peter> either be in memory("m"), or in an address register("a").  What I need
Peter> is a way of indicaing that the operand is in memory, but needs to be
Peter> accessed via register indirect.

	No.  What you asked for is:

"...there should be another one that indicates that reload should just
pull the address of the operand into a register to make it register
indirect."

'a' will pull the address of the operand into a register.  What you do
with that afterwards is up to you.  You can turn that address contained in
a register into an indirect reference via your output template.

You are asking for a well-known constraint that reload can know about and
do something sensible.  'a' will provide that.  Stop asking for something
more complicated.

David


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