1//===- HexagonCallingConv.td - Calling Conventions Hexagon -*- 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// 10// This describes the calling conventions for the Hexagon architectures. 11// 12//===----------------------------------------------------------------------===// 13 14//===----------------------------------------------------------------------===// 15// Return Value Calling Conventions 16//===----------------------------------------------------------------------===// 17 18// Hexagon 32-bit C return-value convention. 19def RetCC_Hexagon32 : CallingConv<[ 20 CCIfType<[i32, f32], CCAssignToReg<[R0, R1, R2, R3, R4, R5]>>, 21 CCIfType<[i64, f64], CCAssignToReg<[D0, D1, D2]>>, 22 23 // Alternatively, they are assigned to the stack in 4-byte aligned units. 24 CCAssignToStack<4, 4> 25]>; 26 27// Hexagon 32-bit C Calling convention. 28def 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]>>, 32 33 // Alternatively, they are assigned to the stack in 4-byte aligned units. 34 CCAssignToStack<4, 4> 35]>; 36