R12 is callee-saved for A- and R- class interrupt handlers

Oliver Stannard oliver.stannard at arm.com
Mon Feb 10 04:24:24 PST 2014


Hi all,

 

For v7A and v7R, r12 must be callee-saved by interrupt handlers. This is
because it is the intra-procedure-call scratch register, which may be
clobbered by any branch subject to a relocation supporting interworking or
long branches (AAPCS, 5.3.1.1, "Use of IP by the linker"). R12 may be used
as a temporary register between function calls, so it must be preserved by
an interrupt handler. It seems that this is mostly implemented, but there
was a bug in the prologue/epilogue generator which prevented it from being
included in the push and pop instructions. The attached patch fixes this.

 

Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140210/06b4d2d0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r12-callee-saved-interrupt.patch
Type: application/octet-stream
Size: 4335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140210/06b4d2d0/attachment.obj>


More information about the llvm-commits mailing list