13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 18 #include "llvm/ADT/Triple.h" 19 #include "llvm/Support/Compiler.h" 33 bool HasNontrappingFPToInt =
false;
34 bool HasSignExt =
false;
35 bool HasExceptionHandling =
false;
36 bool HasBulkMemory =
false;
37 bool HasAtomics =
false;
38 bool HasMutableGlobals =
false;
39 bool HasMultivalue =
false;
40 bool HasTailCall =
false;
47 LargeArrayMinWidth = 128;
48 LargeArrayAlign = 128;
49 SimdDefaultAlign = 128;
50 SigAtomicType = SignedLong;
51 LongDoubleWidth = LongDoubleAlign = 128;
52 LongDoubleFormat = &llvm::APFloat::IEEEquad();
53 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
56 SizeType = UnsignedLong;
57 PtrDiffType = SignedLong;
58 IntPtrType = SignedLong;
66 static void setSIMDLevel(llvm::StringMap<bool> &Features, SIMDEnum
Level);
71 const std::vector<std::string> &FeaturesVec)
const override;
72 bool hasFeature(StringRef Feature)
const final;
74 bool handleTargetFeatures(std::vector<std::string> &Features,
77 bool isValidCPUName(StringRef Name)
const final;
80 bool setCPU(
const std::string &Name)
final {
return isValidCPUName(Name); }
85 return VoidPtrBuiltinVaList;
94 bool validateAsmConstraint(
const char *&Name,
99 const char *getClobbers()
const final {
return ""; }
101 bool isCLZForZeroUndef()
const final {
return false; }
103 bool hasInt128Type()
const final {
return true; }
105 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
107 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
111 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
113 return BitWidth == 64
114 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
124 resetDataLayout(
"e-m:e-p:32:32-i64:64-n32:64-S128");
138 LongAlign = LongWidth = 64;
139 PointerAlign = PointerWidth = 64;
140 SizeType = UnsignedLong;
141 PtrDiffType = SignedLong;
142 IntPtrType = SignedLong;
143 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
152 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H static const Builtin::Info BuiltinInfo[]
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
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...
Options for controlling the target.
WebAssembly64TargetInfo(const llvm::Triple &T, const TargetOptions &Opts)
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Concrete class used by the front-end to report problems and issues.
WebAssemblyTargetInfo(const llvm::Triple &T, const TargetOptions &)
Exposes information about the current target.
Defines the clang::TargetOptions class.
IntType
===-— Target Data Type Query Methods ----------------------------—===//
Dataflow Directional Tag Classes.
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
WebAssembly32TargetInfo(const llvm::Triple &T, const TargetOptions &Opts)
Defines the clang::TargetInfo interface.