This is the mail archive of the gcc-patches@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: RFA: Avoid automodification in ARM call addresses


Richard Sandiford <richard@codesourcery.com> writes:

> I'm probably misunderstanding you, sorry, but I think changing the
> constraint from 'm' to 'o' misses the point of the patch.  The problem
> isn't that 'm' is too pemissive; it isn't.  The patterns can handle
> unspilled automodified addresses just fine.  The problem is that, if the
> automodified address register is spilled, we have an address that is not
> a valid memory operand as-is, namely:
> 
>     (mem (pre_inc (mem (plus (reg fp) (const_int ...)))))
> 
> We need to reload this address.  We need an input reload to copy the
> pseudo's stack slot into a base register and an output reload to copy
> the base register back to the spill slot.

Yes, I understand.

> The same would be true if we changed the constraints to 'o'.

Although I haven't tried it, I don't think so.  If you change the
constraint to 'o', the compiler will reload the address into a
register before the instruction.  This reload should include the
autoincrement.  There shouldn't be an output reload.

It's possible that I am wrong about how 'o' will work.  Please give it
a try and let me know.  Thanks.

Ian


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