blob: 38ada69c2425e51d9ade476308c7d0824e554f55 [file] [log] [blame]
Eli Friedman796492d2009-07-19 01:11:32 +00001//===- 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//===----------------------------------------------------------------------===//
15def 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//===----------------------------------------------------------------------===//
26def 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]>;