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

Tim Northover t.p.northover at gmail.com
Mon Feb 10 06:24:47 PST 2014


> 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.

Looks good to me! Thanks for that.

Tim.




More information about the llvm-commits mailing list