1 //===--- TargetBuiltins.h - Target specific builtin IDs ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief Enumerates target-specific builtins in their own namespaces within
12 /// namespace ::clang.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_CLANG_BASIC_TARGETBUILTINS_H
17 #define LLVM_CLANG_BASIC_TARGETBUILTINS_H
20 #include "clang/Basic/Builtins.h"
27 LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
28 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
29 #include "clang/Basic/BuiltinsNEON.def"
34 /// \brief ARM builtins
37 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
38 LastNEONBuiltin = NEON::FirstTSBuiltin - 1,
39 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
40 #include "clang/Basic/BuiltinsARM.def"
45 /// \brief AArch64 builtins
48 LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
49 LastNEONBuiltin = NEON::FirstTSBuiltin - 1,
50 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
51 #include "clang/Basic/BuiltinsAArch64.def"
56 /// \brief PPC builtins
59 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
60 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
61 #include "clang/Basic/BuiltinsPPC.def"
66 /// \brief NVPTX builtins
69 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
70 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
71 #include "clang/Basic/BuiltinsNVPTX.def"
76 /// \brief AMDGPU builtins
79 LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
80 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
81 #include "clang/Basic/BuiltinsAMDGPU.def"
86 /// \brief X86 builtins
89 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
90 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
91 #include "clang/Basic/BuiltinsX86.def"
96 /// \brief Flags to identify the types for overloaded Neon builtins.
98 /// These must be kept in sync with the flags in utils/TableGen/NeonEmitter.h.
122 NeonTypeFlags(unsigned F) : Flags(F) {}
123 NeonTypeFlags(EltType ET, bool IsUnsigned, bool IsQuad) : Flags(ET) {
125 Flags |= UnsignedFlag;
130 EltType getEltType() const { return (EltType)(Flags & EltTypeMask); }
131 bool isPoly() const {
132 EltType ET = getEltType();
133 return ET == Poly8 || ET == Poly16;
135 bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; }
136 bool isQuad() const { return (Flags & QuadFlag) != 0; }
139 /// \brief Hexagon builtins
142 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
143 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
144 #include "clang/Basic/BuiltinsHexagon.def"
149 /// \brief MIPS builtins
152 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
153 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
154 #include "clang/Basic/BuiltinsMips.def"
159 /// \brief XCore builtins
162 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
163 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
164 #include "clang/Basic/BuiltinsXCore.def"
169 /// \brief Le64 builtins
172 LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
173 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
174 #include "clang/Basic/BuiltinsLe64.def"
179 /// \brief SystemZ builtins
182 LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1,
183 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
184 #include "clang/Basic/BuiltinsSystemZ.def"
188 } // end namespace clang.