summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMCallingConv.td
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2015-07-12 18:16:40 +0000
committerRenato Golin <renato.golin@linaro.org>2015-07-12 18:16:40 +0000
commit1ef7a0f7c03b57e0b7f38aa9965f8e8077558fd7 (patch)
treecfa89c241f7f0907ef70092f35cda65ce509d255 /llvm/lib/Target/ARM/ARMCallingConv.td
parent268ef6af0b801c205bcb2f599a7c2182bb9f3d39 (diff)
downloadbcm5719-llvm-1ef7a0f7c03b57e0b7f38aa9965f8e8077558fd7.tar.gz
bcm5719-llvm-1ef7a0f7c03b57e0b7f38aa9965f8e8077558fd7.zip
[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
Diffstat (limited to 'llvm/lib/Target/ARM/ARMCallingConv.td')
-rw-r--r--llvm/lib/Target/ARM/ARMCallingConv.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallingConv.td b/llvm/lib/Target/ARM/ARMCallingConv.td
index 7dd21ecbe91..27cf06b995a 100644
--- a/llvm/lib/Target/ARM/ARMCallingConv.td
+++ b/llvm/lib/Target/ARM/ARMCallingConv.td
@@ -142,6 +142,9 @@ def CC_ARM_AAPCS : CallingConv<[
// Handles byval parameters.
CCIfByVal<CCPassByVal<4, 4>>,
+ // The 'nest' parameter, if any, is passed in R12.
+ CCIfNest<CCAssignToReg<[R12]>>,
+
// Handle all vector types as either f64 or v2f64.
CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType<f64>>,
CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType<v2f64>>,
OpenPOWER on IntegriCloud