13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_HEXAGON_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_HEXAGON_H
18#include "llvm/Support/Compiler.h"
19#include "llvm/TargetParser/Triple.h"
27 static const char *
const GCCRegNames[];
30 std::string HVXVersion;
32 bool HasHVX64B =
false;
33 bool HasHVX128B =
false;
34 bool HasAudio =
false;
35 bool UseLongCalls =
false;
44 "e-m:e-p:32:32:32-a:0-n16:32-"
45 "i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-"
46 "v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048");
47 SizeType = UnsignedInt;
48 PtrDiffType = SignedInt;
49 IntPtrType = SignedInt;
55 LargeArrayMinWidth = 64;
57 UseBitFieldTypeAlignment =
true;
58 ZeroLengthBitfieldBoundary = 32;
59 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
65 BoolWidth = BoolAlign = 8;
95 bool hasFeature(StringRef Feature)
const override;
100 const std::vector<std::string> &FeaturesVec)
const override;
102 bool handleTargetFeatures(std::vector<std::string> &Features,
106 if (getTriple().isMusl())
107 return TargetInfo::HexagonBuiltinVaList;
108 return TargetInfo::CharPtrBuiltinVaList;
117 static const char *getHexagonCPUSuffix(StringRef Name);
120 return getHexagonCPUSuffix(Name);
125 bool setCPU(
const std::string &Name)
override {
126 if (!isValidCPUName(Name))
133 return RegNo < 2 ? RegNo : -1;
138 return CPU.find(
't') != std::string::npos;
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.
Defines the clang::TargetOptions class.
Concrete class used by the front-end to report problems and issues.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Exposes information about the current target.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Options for controlling the target.
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
HexagonTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
bool setCPU(const std::string &Name) override
Target the specified CPU.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool isCLZForZeroUndef() const override
The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for ...
Defines the clang::TargetInfo interface.