[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)
commit1ef7a0f7c03b57e0b7f38aa9965f8e8077558fd7
treecfa89c241f7f0907ef70092f35cda65ce509d255
parent268ef6af0b801c205bcb2f599a7c2182bb9f3d39
[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.

llvm-svn: 241996
llvm/lib/Target/ARM/ARMCallingConv.td
llvm/test/CodeGen/ARM/nest-register.ll [new file with mode: 0644]