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 // R1 is an llvm extension, I don't know what gcc does
18 CCIfType<[i64], CCAssignToReg<[R0,R1]>>,
20 // f32 / f64 are returned in F0/F1
21 CCIfType<[f32, f64], CCAssignToReg<[F0, F1]>>
24 //===----------------------------------------------------------------------===//
25 // Alpha Argument Calling Conventions
26 //===----------------------------------------------------------------------===//
27 def CC_Alpha : CallingConv<[
28 // The first 6 arguments are passed in registers, whether integer or
30 CCIfType<[i64], CCAssignToRegWithShadow<[R16, R17, R18, R19, R20, R21],
31 [F16, F17, F18, F19, F20, F21]>>,
33 CCIfType<[f32, f64], CCAssignToRegWithShadow<[F16, F17, F18, F19, F20, F21],
34 [R16, R17, R18, R19, R20, R21]>>,
36 // Stack slots are 8 bytes in size and 8-byte aligned.
37 CCIfType<[i64, f32, f64], CCAssignToStack<8, 8>>