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" 28 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
29 SizeType = UnsignedLong;
30 PtrDiffType = SignedLong;
31 IntPtrType = SignedLong;
32 IntMaxType = SignedLong;
33 Int64Type = SignedLong;
35 if (Triple.getArch() == llvm::Triple::bpfeb) {
36 resetDataLayout(
"E-m:e-p:64:64-i64:64-n32:64-S128");
38 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
40 MaxAtomicPromoteWidth = 64;
41 MaxAtomicInlineWidth = 64;
49 return Feature ==
"bpf" || Feature ==
"alu32" || Feature ==
"dwarfris";
53 bool Enabled)
const override {
54 Features[Name] = Enabled;
87 bool isValidCPUName(StringRef Name)
const override;
91 bool setCPU(
const std::string &Name)
override {
92 StringRef CPUName(Name);
93 return isValidCPUName(CPUName);
98 #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.
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.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
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.