13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H 18 #include "llvm/ADT/Triple.h" 19 #include "llvm/Support/Compiler.h" 30 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
31 SizeType = UnsignedLong;
32 PtrDiffType = SignedLong;
33 IntPtrType = SignedLong;
34 IntMaxType = SignedLong;
35 Int64Type = SignedLong;
37 if (Triple.getArch() == llvm::Triple::bpfeb) {
38 resetDataLayout(
"E-m:e-p:64:64-i64:64-n32:64-S128");
40 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
42 MaxAtomicPromoteWidth = 64;
43 MaxAtomicInlineWidth = 64;
51 return Feature ==
"bpf" || Feature ==
"alu32" || Feature ==
"dwarfris";
55 bool Enabled)
const override {
56 Features[Name] = Enabled;
91 bool isValidCPUName(StringRef Name)
const override;
95 bool setCPU(
const std::string &Name)
override {
96 StringRef CPUName(Name);
97 return isValidCPUName(CPUName);
102 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_BPF_H
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
static const Builtin::Info BuiltinInfo[]
Options for controlling the target.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
typedef void* __builtin_va_list;
Exposes information about the current target.
BPFTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool isValidGCCRegisterName(StringRef Name) const override
Returns whether the passed in string is a valid register name according to GCC.
void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const override
Enable or disable a specific target feature; the feature name must be valid.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
Defines the clang::TargetOptions class.
bool allowDebugInfoForExternalVar() const override
Whether target allows debuginfo types for decl only variables.
ArrayRef< const char * > getGCCRegNames() const override
Dataflow Directional Tag Classes.
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Defines the clang::TargetInfo interface.
bool setCPU(const std::string &Name) override
Target the specified CPU.