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


Ian Lance Taylor <ian@airs.com> writes:
>> 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.

I don't follow, sorry.  If the constraints were changed to 'o', what do
you expect will write the modified address register back to the spill
slot?  If you don't think this should be done by an output reload, what
sort of reload should it be?

Also: the test case uses pre_inc (because that's what the original
test case I saw used).  But how would you expect post-modification
to be handled?  The increment or decrement will be emitted _after_
the main instruction in that case, followed again by a copy-out
to the spill slot.

(Also, if you think that the copy-out should happen before the main
instruction, remember that an automodified address register can be
used by other MEMs in the instruction.  Those other references are
supposed to use the unmodified value.)

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

Yeah, FWIW, I did check before sending my earlier reply, just to make
sure that it worked as I said.

Richard


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