X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FIR%2FCallingConv.h;h=bc050928266efadaf9e28d121fb1952e33458197;hp=0c305439dd048ec2bdcc8e0bbd1763afbeed7082;hb=9889174eadb0f269ef132b3bd34a9f6fe3baa642;hpb=d89b0f200c54479bd556a5677d165865668ebcbf diff --git a/include/llvm/IR/CallingConv.h b/include/llvm/IR/CallingConv.h index 0c305439dd0..bc050928266 100644 --- a/include/llvm/IR/CallingConv.h +++ b/include/llvm/IR/CallingConv.h @@ -20,10 +20,13 @@ namespace llvm { /// the well-known calling conventions. /// namespace CallingConv { + /// LLVM IR allows to use arbitrary numbers as calling convention identifiers. + typedef unsigned ID; + /// A set of enums which specify the assigned numeric values for known llvm /// calling conventions. /// @brief LLVM Calling Convention Representation - enum ID { + enum { /// C - The default llvm calling convention, compatible with C. This /// convention is the only calling convention that supports varargs calls. /// As with typical C calling conventions, the callee/caller have to @@ -66,6 +69,12 @@ namespace CallingConv { // (almost) all registers. PreserveAll = 15, + // Swift - Calling convention for Swift. + Swift = 16, + + // CXX_FAST_TLS - Calling convention for access functions. + CXX_FAST_TLS = 17, + // Target - This is the start of the target-specific calling conventions, // e.g. fastcall and thiscall on X86. FirstTargetCC = 64, @@ -139,16 +148,29 @@ namespace CallingConv { /// arguments are shadowed by GPRs, and vice versa. X86_64_Win64 = 79, - /// \brief The calling convention used for __cdecl methods on win32. - /// Differs from the C calling convention only in that the order of the - /// first parameter and the sret parameter are swapped. - X86_CDeclMethod = 80 + /// \brief MSVC calling convention that passes vectors and vector aggregates + /// in SSE registers. + X86_VectorCall = 80, - }; + /// \brief Calling convention used by HipHop Virtual Machine (HHVM) to + /// perform calls to and from translation cache, and for calling PHP + /// functions. + /// HHVM calling convention supports tail/sibling call elimination. + HHVM = 81, - /// isARMTargetCC - Return true if the specific calling convention is one of - /// ARM target specific calling convention. - bool isARMTargetCC(ID id); + /// \brief HHVM calling convention for invoking C/C++ helpers. + HHVM_C = 82, + + /// X86_INTR - x86 hardware interrupt context. Callee may take one or two + /// parameters, where the 1st represents a pointer to hardware context frame + /// and the 2nd represents hardware error code, the presence of the later + /// depends on the interrupt vector taken. Valid for both 32- and 64-bit + /// subtargets. + X86_INTR = 83, + + /// The highest possible calling convention ID. Must be some 2^k - 1. + MaxID = 1023 + }; } // End CallingConv namespace } // End llvm namespace