summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2015-07-09 10:18:02 +0000
committerRenato Golin <renato.golin@linaro.org>2015-07-09 10:18:02 +0000
commit17d4efe7c1a271ca216008fe0f6598e8f96dfe30 (patch)
tree3eecaec0f2ec7620337ab08f8d761f355422d114
parentb6b0ddfc95f36aa6d511d9a6383c285fe369e808 (diff)
downloadbcm5719-llvm-17d4efe7c1a271ca216008fe0f6598e8f96dfe30.tar.gz
bcm5719-llvm-17d4efe7c1a271ca216008fe0f6598e8f96dfe30.zip
Add support for nest attribute to AArch64 backend
The nest attribute is currently supported on the x86 (32-bit) and x86-64 backends, but not on ARM (32-bit) or AArch64. This patch adds support for nest to the AArch64 backend. Register x18 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. Patch by Stephen Cross. llvm-svn: 241794
-rw-r--r--llvm/lib/Target/AArch64/AArch64CallingConvention.td5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64CallingConvention.td b/llvm/lib/Target/AArch64/AArch64CallingConvention.td
index 4691e949838..815ebef177d 100644
--- a/llvm/lib/Target/AArch64/AArch64CallingConvention.td
+++ b/llvm/lib/Target/AArch64/AArch64CallingConvention.td
@@ -40,6 +40,11 @@ def CC_AArch64_AAPCS : CallingConv<[
// slot is 64-bit.
CCIfByVal<CCPassByVal<8, 8>>,
+ // The 'nest' parameter, if any, is passed in X18.
+ // Darwin uses X18 as the platform register and hence 'nest' isn't currently
+ // supported there.
+ CCIfNest<CCAssignToReg<[X18]>>,
+
CCIfConsecutiveRegs<CCCustom<"CC_AArch64_Custom_Block">>,
// Handle i1, i8, i16, i32, i64, f32, f64 and v2f64 by passing in registers,
OpenPOWER on IntegriCloud