[ARM] Add support for nest attribute using r12
authorRenato Golin <renato.golin@linaro.org>
Sun, 12 Jul 2015 18:16:40 +0000 (18:16 +0000)
committerRenato Golin <renato.golin@linaro.org>
Sun, 12 Jul 2015 18:16:40 +0000 (18:16 +0000)
commit4173058d07bb369942b4aa3003d09dd2e8e096ea
tree421a435775a356292f00bcda33d222b55d3cb163
parent07c08a6a50e61889b46bbdca86419185d6237d88
[ARM] Add support for nest attribute using r12

Register r12 ('ip') is used by GCC for this purpose
and hence is used here. As discussed on the GCC mailing
list, the register choice is an ABI issue and so
choosing the same register as GCC means
__builtin_call_with_static_chain is compatible.

A similar patch has just gone in the AArch64 backend,
so this is just the ARM counterpart, following the same
discussion.

Patch by Stephen Cross.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMCallingConv.td
test/CodeGen/ARM/nest-register.ll [new file with mode: 0644]