blob: 33ecfdf5f7501a35fffef29f133513890bcfb3e5 [file] [log] [blame]
Chris Lattner5a65b922008-03-17 05:41:48 +00001//===- SparcCallingConv.td - Calling Conventions Sparc -----*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This describes the calling conventions for the Sparc architectures.
11//
12//===----------------------------------------------------------------------===//
13
14//===----------------------------------------------------------------------===//
15// Return Value Calling Conventions
16//===----------------------------------------------------------------------===//
17
18// Sparc 32-bit C return-value convention.
19def RetCC_Sparc32 : CallingConv<[
Anton Korobeynikovdf75bba2008-10-10 20:30:14 +000020 CCIfType<[i32], CCAssignToReg<[I0, I1, I2, I3, I4, I5]>>,
Anton Korobeynikov875314b2008-10-10 21:47:37 +000021 CCIfType<[f32], CCAssignToReg<[F0, F1, F2, F3]>>,
22 CCIfType<[f64], CCAssignToReg<[D0, D1]>>
Chris Lattner5a65b922008-03-17 05:41:48 +000023]>;
Chris Lattner315123f2008-03-17 06:58:37 +000024
25// Sparc 32-bit C Calling convention.
26def CC_Sparc32 : CallingConv<[
27 // All arguments get passed in integer registers if there is space.
28 CCIfType<[i32, f32, f64], CCAssignToReg<[I0, I1, I2, I3, I4, I5]>>,
29
30 // Alternatively, they are assigned to the stack in 4-byte aligned units.
31 CCAssignToStack<4, 4>
32]>;