Handle assembler identifiers specially in CBE. This fixes PR2418.
[oota-llvm.git] / lib / Target / TargetCallingConv.td
index 3a01ddff2bf8f13e76af375199914cc18bcb844b..908e16ed5e78ee655ed608d59ba59924e7bc7952 100644 (file)
@@ -32,9 +32,9 @@ class CCIf<string predicate, CCAction A> : CCPredicateAction<A> {
   string Predicate = predicate;
 }
 
-/// CCIfStruct - If the current argument is a struct, apply
+/// CCIfByVal - If the current argument has ByVal parameter attribute, apply
 /// Action A.
-class CCIfStruct<CCAction A> : CCIf<"ArgFlags & ISD::ParamFlags::ByVal", A> {
+class CCIfByVal<CCAction A> : CCIf<"ArgFlags.isByVal()", A> {
 }
 
 /// CCIfCC - Match of the current calling convention is 'CC'.
@@ -43,11 +43,11 @@ class CCIfCC<string CC, CCAction A>
 
 /// CCIfInReg - If this argument is marked with the 'inreg' attribute, apply
 /// the specified action.
-class CCIfInReg<CCAction A> : CCIf<"ArgFlags & ISD::ParamFlags::InReg", A> {}
+class CCIfInReg<CCAction A> : CCIf<"ArgFlags.isInReg()", 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> {}
+class CCIfNest<CCAction A> : CCIf<"ArgFlags.isNest()", A> {}
 
 /// CCIfNotVarArg - If the current function is not vararg - apply the action
 class CCIfNotVarArg<CCAction A> : CCIf<"!State.isVarArg()", A> {}
@@ -59,6 +59,14 @@ class CCAssignToReg<list<Register> regList> : CCAction {
   list<Register> RegList = regList;
 }
 
+/// CCAssignToRegWithShadow - Same as CCAssignToReg, but with list of registers
+/// which became shadowed, when some register is used.
+class CCAssignToRegWithShadow<list<Register> regList,
+                              list<Register> shadowList> : CCAction {
+  list<Register> RegList = regList;
+  list<Register> ShadowRegList = shadowList;
+}
+
 /// CCAssignToStack - This action always matches: it assigns the value to a
 /// stack slot of the specified size and alignment on the stack.  If size is
 /// zero then the ABI size is used; if align is zero then the ABI alignment
@@ -68,11 +76,12 @@ class CCAssignToStack<int size, int align> : CCAction {
   int Align = align;
 }
 
-/// 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;
+/// CCPassByVal - This action always matches: it assigns the value to a stack
+/// slot to implement ByVal aggregate parameter passing. Size and alignment
+/// specify the minimum size and alignment for the stack slot.
+class CCPassByVal<int size, int align> : CCAction {
+  int Size = size;
+  int Align = align;
 }
 
 /// CCPromoteToType - If applied, this promotes the specified current value to