1234285Sdim//===- HexagonCallingConv.td - Calling Conventions Hexagon -*- tablegen -*-===// 2234285Sdim// 3234285Sdim// The LLVM Compiler Infrastructure 4234285Sdim// 5234285Sdim// This file is distributed under the University of Illinois Open Source 6234285Sdim// License. See LICENSE.TXT for details. 7234285Sdim// 8234285Sdim//===----------------------------------------------------------------------===// 9234285Sdim// 10234285Sdim// This describes the calling conventions for the Hexagon architectures. 11234285Sdim// 12234285Sdim//===----------------------------------------------------------------------===// 13234285Sdim 14234285Sdim//===----------------------------------------------------------------------===// 15234285Sdim// Return Value Calling Conventions 16234285Sdim//===----------------------------------------------------------------------===// 17234285Sdim 18234285Sdim// Hexagon 32-bit C return-value convention. 19234285Sdimdef RetCC_Hexagon32 : CallingConv<[ 20245431Sdim CCIfType<[i32, f32], CCAssignToReg<[R0, R1, R2, R3, R4, R5]>>, 21245431Sdim CCIfType<[i64, f64], CCAssignToReg<[D0, D1, D2]>>, 22234285Sdim 23234285Sdim // Alternatively, they are assigned to the stack in 4-byte aligned units. 24234285Sdim CCAssignToStack<4, 4> 25234285Sdim]>; 26234285Sdim 27234285Sdim// Hexagon 32-bit C Calling convention. 28234285Sdimdef CC_Hexagon32 : CallingConv<[ 29234285Sdim // All arguments get passed in integer registers if there is space. 30245431Sdim CCIfType<[f32, i32, i16, i8], CCAssignToReg<[R0, R1, R2, R3, R4, R5]>>, 31245431Sdim CCIfType<[f64, i64], CCAssignToReg<[D0, D1, D2]>>, 32234285Sdim 33234285Sdim // Alternatively, they are assigned to the stack in 4-byte aligned units. 34234285Sdim CCAssignToStack<4, 4> 35234285Sdim]>; 36