summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit49b269d78070178f9ddc103697e5425c81d0f04f (patch)
tree553d570b75f49c54bfa2031d6fe582f2cf4c4a1c /llvm/lib/Target/Sparc/SparcCallingConv.td
parent0a1762e374d866ae798cdd664a68bba0a86a7799 (diff)
downloadbcm5719-llvm-49b269d78070178f9ddc103697e5425c81d0f04f.tar.gz
bcm5719-llvm-49b269d78070178f9ddc103697e5425c81d0f04f.zip
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. llvm-svn: 48443
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcCallingConv.td')
-rw-r--r--llvm/lib/Target/Sparc/SparcCallingConv.td23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcCallingConv.td b/llvm/lib/Target/Sparc/SparcCallingConv.td
new file mode 100644
index 00000000000..02d24397e6d
--- /dev/null
+++ b/llvm/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]>>
+]>;
OpenPOWER on IntegriCloud