Unifacalize the CALLSEQ{START,END} stuff.
[oota-llvm.git] / lib / Target / TargetCallingConv.td
index e710ad08e7746de5a36186096e2fe2492ee73b35..05029a01a6db6d4ad18779c282a1a3dcfaee39f9 100644 (file)
@@ -32,6 +32,11 @@ class CCIf<string predicate, CCAction A> : CCPredicateAction<A> {
   string Predicate = predicate;
 }
 
+/// CCIfStruct - If the current argument is a struct, apply
+/// Action A.
+class CCIfStruct<CCAction A> : CCIf<"ArgFlags & ISD::ParamFlags::ByVal", A> {
+}
+
 /// CCIfCC - Match of the current calling convention is 'CC'.
 class CCIfCC<string CC, CCAction A>
   : CCIf<!strconcat("State.getCallingConv() == ", CC), A> {}
@@ -40,6 +45,10 @@ class CCIfCC<string CC, CCAction A>
 /// the specified action.
 class CCIfInReg<CCAction A> : CCIf<"ArgFlags & ISD::ParamFlags::InReg", A> {}
 
+/// CCIfNest - If this argument is marked with the 'nest' attribute, apply
+/// the specified action.
+class CCIfNest<CCAction A> : CCIf<"ArgFlags & ISD::ParamFlags::Nest", A> {}
+
 /// CCIfNotVarArg - If the current function is not vararg - apply the action
 class CCIfNotVarArg<CCAction A> : CCIf<"!State.isVarArg()", A> {}
 
@@ -57,6 +66,19 @@ class CCAssignToStack<int size, int align> : CCAction {
   int Align = align;
 }
 
+/// CCAssignToStackABISizeAlign - This action always matches: it assigns
+/// the value to a stack slot of the ABISize and ABIAlignment for the type,
+/// which may depend on the target or subtarget.
+/// "ignored" is here because an empty arg list does not work.
+class CCAssignToStackABISizeAlign<int ignored> : CCAction {
+}
+
+/// CCStructAssign - This action always matches: it will use the C ABI and
+/// the register availability to decided whether to assign to a set of
+/// registers or to a stack slot.
+class CCStructAssign<list<Register> regList> : CCAction {
+  list<Register> RegList = regList;
+}
 
 /// CCPromoteToType - If applied, this promotes the specified current value to
 /// the specified type.
@@ -75,4 +97,3 @@ class CCDelegateTo<CallingConv cc> : CCAction {
 class CallingConv<list<CCAction> actions> {
   list<CCAction> Actions = actions;
 }
-