1 //===- HexagonCallingConv.td - Calling Conventions Hexagon -*- 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 //===----------------------------------------------------------------------===//
10 // This describes the calling conventions for the Hexagon architectures.
12 //===----------------------------------------------------------------------===//
14 //===----------------------------------------------------------------------===//
15 // Return Value Calling Conventions
16 //===----------------------------------------------------------------------===//
18 // Hexagon 32-bit C return-value convention.
19 def RetCC_Hexagon32 : CallingConv<[
20 CCIfType<[i32, f32], CCAssignToReg<[R0, R1, R2, R3, R4, R5]>>,
21 CCIfType<[i64, f64], CCAssignToReg<[D0, D1, D2]>>,
23 // Alternatively, they are assigned to the stack in 4-byte aligned units.
27 // Hexagon 32-bit C Calling convention.
28 def CC_Hexagon32 : CallingConv<[
29 // All arguments get passed in integer registers if there is space.
30 CCIfType<[f32, i32, i16, i8], CCAssignToReg<[R0, R1, R2, R3, R4, R5]>>,
31 CCIfType<[f64, i64], CCAssignToReg<[D0, D1, D2]>>,
33 // Alternatively, they are assigned to the stack in 4-byte aligned units.