Switch Alpha over to the new call lowering style. New code mostly
[oota-llvm.git] / lib / Target / Alpha / AlphaCallingConv.td
1 //===- AlphaCallingConv.td - Calling Conventions for Alpha -*- 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 // This describes the calling conventions for Alpha architecture.
10 //===----------------------------------------------------------------------===//
11
12 //===----------------------------------------------------------------------===//
13 // Alpha Return Value Calling Convention
14 //===----------------------------------------------------------------------===//
15 def RetCC_Alpha : CallingConv<[
16   // i64 is returned in register R0
17   CCIfType<[i64], CCAssignToReg<[R0]>>,
18
19   // f32 / f64 are returned in F0/F1
20   CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>>
21 ]>;
22
23 //===----------------------------------------------------------------------===//
24 // Alpha Argument Calling Conventions
25 //===----------------------------------------------------------------------===//
26 def CC_Alpha : CallingConv<[
27   // The first 6 arguments are passed in registers, whether integer or
28   // floating-point
29   CCIfType<[i64], CCAssignToRegWithShadow<[R16, R17, R18, R19, R20, R21],
30                                           [F16, F17, F18, F19, F20, F21]>>,
31
32   CCIfType<[f32, f64], CCAssignToRegWithShadow<[F16, F17, F18, F19, F20, F21],
33                                                [R16, R17, R18, R19, R20, R21]>>,
34
35   // Stack slots are 8 bytes in size and 8-byte aligned.
36   CCIfType<[i64, f32, f64], CCAssignToStack<8, 8>>
37 ]>;