14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_WEBASSEMBLY_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 34 bool HasNontrappingFPToInt;
36 bool HasExceptionHandling;
41 HasSignExt(
false), HasExceptionHandling(
false) {
44 LargeArrayMinWidth = 128;
45 LargeArrayAlign = 128;
46 SimdDefaultAlign = 128;
47 SigAtomicType = SignedLong;
48 LongDoubleWidth = LongDoubleAlign = 128;
49 LongDoubleFormat = &llvm::APFloat::IEEEquad();
50 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
53 SizeType = UnsignedLong;
54 PtrDiffType = SignedLong;
55 IntPtrType = SignedLong;
63 static void setSIMDLevel(llvm::StringMap<bool> &Features, SIMDEnum
Level);
68 const std::vector<std::string> &FeaturesVec)
const override;
69 bool hasFeature(StringRef Feature)
const final;
71 bool handleTargetFeatures(std::vector<std::string> &Features,
74 bool isValidCPUName(StringRef Name)
const final;
77 bool setCPU(
const std::string &Name)
final {
return isValidCPUName(Name); }
82 return VoidPtrBuiltinVaList;
91 bool validateAsmConstraint(
const char *&Name,
96 const char *getClobbers()
const final {
return ""; }
98 bool isCLZForZeroUndef()
const final {
return false; }
100 bool hasInt128Type()
const final {
return true; }
102 IntType getIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
104 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
108 IntType getLeastIntTypeByWidth(
unsigned BitWidth,
bool IsSigned)
const final {
110 return BitWidth == 64
111 ? (IsSigned ? SignedLongLong : UnsignedLongLong)
121 resetDataLayout(
"e-m:e-p:32:32-i64:64-n32:64-S128");
135 LongAlign = LongWidth = 64;
136 PointerAlign = PointerWidth = 64;
137 SizeType = UnsignedLong;
138 PtrDiffType = SignedLong;
139 IntPtrType = SignedLong;
140 resetDataLayout(
"e-m:e-p:64:64-i64:64-n32:64-S128");
149 #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.