1193323Sed//==- MSP430CallingConv.td - Calling Conventions for MSP430 -*- tablegen -*-==// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// This describes the calling conventions for MSP430 architecture. 10193323Sed//===----------------------------------------------------------------------===// 11193323Sed 12193323Sed//===----------------------------------------------------------------------===// 13193323Sed// MSP430 Return Value Calling Convention 14193323Sed//===----------------------------------------------------------------------===// 15193323Seddef RetCC_MSP430 : CallingConv<[ 16193323Sed // i8 are returned in registers R15B, R14B, R13B, R12B 17193323Sed CCIfType<[i8], CCAssignToReg<[R15B, R14B, R13B, R12B]>>, 18193323Sed 19193323Sed // i16 are returned in registers R15, R14, R13, R12 20193323Sed CCIfType<[i16], CCAssignToReg<[R15W, R14W, R13W, R12W]>> 21193323Sed]>; 22193323Sed 23193323Sed//===----------------------------------------------------------------------===// 24193323Sed// MSP430 Argument Calling Conventions 25193323Sed//===----------------------------------------------------------------------===// 26263508Sdimdef CC_MSP430_AssignStack : CallingConv<[ 27249423Sdim // Pass by value if the byval attribute is given 28249423Sdim CCIfByVal<CCPassByVal<2, 2>>, 29249423Sdim 30193323Sed // Promote i8 arguments to i16. 31193323Sed CCIfType<[i8], CCPromoteToType<i16>>, 32193323Sed 33193323Sed // Integer values get stored in stack slots that are 2 bytes in 34193323Sed // size and 2-byte aligned. 35193323Sed CCIfType<[i16], CCAssignToStack<2, 2>> 36193323Sed]>; 37263508Sdim 38