summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCCallingConv.td
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-08-30 22:18:55 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-08-30 22:18:55 +0000
commit11addd2a2f584571ffcfd51711972b27aef0133f (patch)
treeab01eaa8f349f32f53b2a4337e091951d8a20814 /lib/Target/PowerPC/PPCCallingConv.td
parent06f9db01ba294cc0834fe7d6cc8180291822fa43 (diff)
downloadllvm-11addd2a2f584571ffcfd51711972b27aef0133f.tar.gz
llvm-11addd2a2f584571ffcfd51711972b27aef0133f.tar.bz2
llvm-11addd2a2f584571ffcfd51711972b27aef0133f.tar.xz
[PowerPC] Call support for fast-isel.
This patch adds fast-isel support for calls (but not intrinsic calls or varargs calls). It also removes a badly-formed assert. There are some new tests just for calls, and also for folding loads into arguments on calls to avoid extra extends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCCallingConv.td')
-rw-r--r--lib/Target/PowerPC/PPCCallingConv.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCCallingConv.td b/lib/Target/PowerPC/PPCCallingConv.td
index 9c937edee4..e8e7f4c2d2 100644
--- a/lib/Target/PowerPC/PPCCallingConv.td
+++ b/lib/Target/PowerPC/PPCCallingConv.td
@@ -42,6 +42,17 @@ def RetCC_PPC : CallingConv<[
// logic. FIXME: See if the logic can be simplified with use of CCs.
// This may require some extensions to current table generation.
+// Simple calling convention for 64-bit ELF PowerPC fast isel.
+// Only handle ints and floats. All ints are promoted to i64.
+// Vector types and quadword ints are not handled.
+def CC_PPC64_ELF_FIS : CallingConv<[
+ CCIfType<[i8], CCPromoteToType<i64>>,
+ CCIfType<[i16], CCPromoteToType<i64>>,
+ CCIfType<[i32], CCPromoteToType<i64>>,
+ CCIfType<[i64], CCAssignToReg<[X3, X4, X5, X6, X7, X8, X9, X10]>>,
+ CCIfType<[f32, f64], CCAssignToReg<[F1, F2, F3, F4, F5, F6, F7, F8]>>
+]>;
+
// Simple return-value convention for 64-bit ELF PowerPC fast isel.
// All small ints are promoted to i64. Vector types, quadword ints,
// and multiple register returns are "supported" to avoid compile