X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTarget%2FTargetCallingConv.td;h=9d1dc3837ac14fb06b2a7b8314815dd0c955ab67;hb=39d8dcb53b806841c8455637c23549b24760ce80;hp=224c08e176c7910faa0f80d57b13f0021e03af37;hpb=1f595bb42950088ccb8246e6b065a96027b46ec6;p=oota-llvm.git diff --git a/include/llvm/Target/TargetCallingConv.td b/include/llvm/Target/TargetCallingConv.td index 224c08e176c..9d1dc3837ac 100644 --- a/include/llvm/Target/TargetCallingConv.td +++ b/include/llvm/Target/TargetCallingConv.td @@ -42,7 +42,7 @@ class CCIf : CCPredicateAction { class CCIfByVal : CCIf<"ArgFlags.isByVal()", A> { } -/// CCIfCC - Match of the current calling convention is 'CC'. +/// CCIfCC - Match if the current calling convention is 'CC'. class CCIfCC : CCIf {} @@ -54,6 +54,14 @@ class CCIfInReg : CCIf<"ArgFlags.isInReg()", A> {} /// the specified action. class CCIfNest : CCIf<"ArgFlags.isNest()", A> {} +/// CCIfSplit - If this argument is marked with the 'split' attribute, apply +/// the specified action. +class CCIfSplit : CCIf<"ArgFlags.isSplit()", A> {} + +/// CCIfSRet - If this argument is marked with the 'sret' attribute, apply +/// the specified action. +class CCIfSRet : CCIf<"ArgFlags.isSRet()", A> {} + /// CCIfNotVarArg - If the current function is not vararg - apply the action class CCIfNotVarArg : CCIf<"!State.isVarArg()", A> {} @@ -81,6 +89,17 @@ class CCAssignToStack : CCAction { int Align = align; } +/// CCAssignToStackWithShadow - Same as CCAssignToStack, but with a list of +/// registers to be shadowed. Note that, unlike CCAssignToRegWithShadow, this +/// shadows ALL of the registers in shadowList. +class CCAssignToStackWithShadow shadowList> : CCAction { + int Size = size; + int Align = align; + list ShadowRegList = shadowList; +} + /// 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. @@ -101,6 +120,12 @@ class CCBitConvertToType : CCAction { ValueType DestTy = destTy; } +/// CCPassIndirect - If applied, this stores the value to stack and passes the pointer +/// as normal argument. +class CCPassIndirect : CCAction { + ValueType DestTy = destTy; +} + /// CCDelegateTo - This action invokes the specified sub-calling-convention. It /// is successful if the specified CC matches. class CCDelegateTo : CCAction { @@ -112,3 +137,20 @@ class CCDelegateTo : CCAction { class CallingConv actions> { list Actions = actions; } + +/// CalleeSavedRegs - A list of callee saved registers for a given calling +/// convention. The order of registers is used by PrologEpilogInsertion when +/// allocation stack slots for saved registers. +/// +/// For each CalleeSavedRegs def, TableGen will emit a FOO_SaveList array for +/// returning from getCalleeSavedRegs(), and a FOO_RegMask bit mask suitable for +/// returning from getCallPreservedMask(). +class CalleeSavedRegs { + dag SaveList = saves; + + // Registers that are also preserved across function calls, but should not be + // included in the generated FOO_SaveList array. These registers will be + // included in the FOO_RegMask bit mask. This can be used for registers that + // are saved automatically, like the SPARC register windows. + dag OtherPreserved; +}