1 //===- AlphaCallingConv.td - Calling Conventions for Alpha -*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // This describes the calling conventions for Alpha architecture.
10 //===----------------------------------------------------------------------===//
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]>>,
19 // f32 / f64 are returned in F0/F1
20 CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>>
23 //===----------------------------------------------------------------------===//
24 // Alpha Argument Calling Conventions
25 //===----------------------------------------------------------------------===//
26 def CC_Alpha : CallingConv<[
27 // The first 6 arguments are passed in registers, whether integer or
29 CCIfType<[i64], CCAssignToRegWithShadow<[R16, R17, R18, R19, R20, R21],
30 [F16, F17, F18, F19, F20, F21]>>,
32 CCIfType<[f32, f64], CCAssignToRegWithShadow<[F16, F17, F18, F19, F20, F21],
33 [R16, R17, R18, R19, R20, R21]>>,
35 // Stack slots are 8 bytes in size and 8-byte aligned.
36 CCIfType<[i64, f32, f64], CCAssignToStack<8, 8>>