[PATCH] Fix return sequence on armv4 thumb

James Molloy james at jamesmolloy.co.uk
Fri Aug 1 08:33:00 PDT 2014


Hi Tim,

> The safest thing to do would be use the register scavenger. And if the
machinery is wired up to restoreCalleeSavedRegisters (fingers crossed) the
easiest way to do *that* is to just create a virtual register (even though
it is post regalloc, it's got special handling in PrologEpilogInserter).

Having run in to this recently, this is not the case. A user of the
regscavenger needs to also call "markRegisterAsUsed" in TargetRegisterInfo.

Cheers,

James


On 1 August 2014 16:17, Tim Northover <t.p.northover at gmail.com> wrote:

> > I had a read on the old APCS and couldn't find any mentions and to why
> R3 should be used as a return register (though it says R0~R3 can be used
> for returning values). But since we don't follow the APCS any more, even on
> ARMv4T, I think we should discard any reference to that document.
>
> iOS is unfortunately stuck with the APCS.
>
> Cheers.
>
> Tim.
>
> http://reviews.llvm.org/D4748
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140801/ba74e7bf/attachment.html>


More information about the llvm-commits mailing list