summaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcCallingConv.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-17 05:41:48 +0000
committerChris Lattner <sabre@nondot.org>2008-03-17 05:41:48 +0000
commit5a65b928302494ad2b3051980ce956e8f9e95023 (patch)
tree3232586e09557d7cd98b76ba534cb3e25a4fd8f7 /lib/Target/Sparc/SparcCallingConv.td
parentd23405e6f04135cabcad4d9bd7aa6e4f187bed3a (diff)
downloadllvm-5a65b928302494ad2b3051980ce956e8f9e95023.tar.gz
llvm-5a65b928302494ad2b3051980ce956e8f9e95023.tar.bz2
llvm-5a65b928302494ad2b3051980ce956e8f9e95023.tar.xz
Start moving sparc to use SparcCallingConv.td, switching over
return lowering first. This fixes a bug where the top and bottom of i64 values were returned in the wrong registers before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcCallingConv.td')
-rw-r--r--lib/Target/Sparc/SparcCallingConv.td23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcCallingConv.td b/lib/Target/Sparc/SparcCallingConv.td
new file mode 100644
index 0000000000..02d24397e6
--- /dev/null
+++ b/lib/Target/Sparc/SparcCallingConv.td
@@ -0,0 +1,23 @@
+//===- SparcCallingConv.td - Calling Conventions Sparc -----*- tablegen -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This describes the calling conventions for the Sparc architectures.
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+// Return Value Calling Conventions
+//===----------------------------------------------------------------------===//
+
+// Sparc 32-bit C return-value convention.
+def RetCC_Sparc32 : CallingConv<[
+ CCIfType<[i32], CCAssignToReg<[I0, I1]>>,
+ CCIfType<[f32], CCAssignToReg<[F0]>>,
+ CCIfType<[f64], CCAssignToReg<[D0]>>
+]>;