aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcCallingConv.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-17 06:58:37 +0000
committerChris Lattner <sabre@nondot.org>2008-03-17 06:58:37 +0000
commit315123fb6a93f26f3660b7cb297ad378ec14c92d (patch)
treefbe5c8ac3e684e9886cc8883e063960a8985b5e5 /lib/Target/Sparc/SparcCallingConv.td
parente0b1215a9299119f064245db1b28bfde55e8950a (diff)
Check in some #ifdef'd out code switching call argument
lowering over to SparcCallingConv.td. We can't make the switch yet because we can't say to pass f64 registers in 2 x i32 registers with the td file yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcCallingConv.td')
-rw-r--r--lib/Target/Sparc/SparcCallingConv.td9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcCallingConv.td b/lib/Target/Sparc/SparcCallingConv.td
index 02d24397e6..dc0bf8e312 100644
--- a/lib/Target/Sparc/SparcCallingConv.td
+++ b/lib/Target/Sparc/SparcCallingConv.td
@@ -21,3 +21,12 @@ def RetCC_Sparc32 : CallingConv<[
CCIfType<[f32], CCAssignToReg<[F0]>>,
CCIfType<[f64], CCAssignToReg<[D0]>>
]>;
+
+// Sparc 32-bit C Calling convention.
+def CC_Sparc32 : CallingConv<[
+ // All arguments get passed in integer registers if there is space.
+ CCIfType<[i32, f32, f64], CCAssignToReg<[I0, I1, I2, I3, I4, I5]>>,
+
+ // Alternatively, they are assigned to the stack in 4-byte aligned units.
+ CCAssignToStack<4, 4>
+]>;