13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_X86_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_X86_H
20#include "llvm/Support/Compiler.h"
21#include "llvm/TargetParser/Triple.h"
22#include "llvm/TargetParser/X86TargetParser.h"
71 enum XOPEnum { NoXOP, SSE4A, FMA4, XOP } XOPLevel = NoXOP;
76 bool HasPCLMUL =
false;
77 bool HasVPCLMULQDQ =
false;
79 bool HasLZCNT =
false;
80 bool HasRDRND =
false;
81 bool HasFSGSBASE =
false;
84 bool HasPOPCNT =
false;
86 bool HasPRFCHW =
false;
87 bool HasRDSEED =
false;
93 bool HasAVX10_1 =
false;
94 bool HasAVX10_1_512 =
false;
95 bool HasAVX10_2 =
false;
96 bool HasAVX10_2_512 =
false;
97 bool HasEVEX512 =
false;
98 bool HasAVX512CD =
false;
99 bool HasAVX512VPOPCNTDQ =
false;
100 bool HasAVX512VNNI =
false;
101 bool HasAVX512FP16 =
false;
102 bool HasAVX512BF16 =
false;
103 bool HasAVX512DQ =
false;
104 bool HasAVX512BITALG =
false;
105 bool HasAVX512BW =
false;
106 bool HasAVX512VL =
false;
107 bool HasAVX512VBMI =
false;
108 bool HasAVX512VBMI2 =
false;
109 bool HasAVXIFMA =
false;
110 bool HasAVX512IFMA =
false;
111 bool HasAVX512VP2INTERSECT =
false;
113 bool HasSHA512 =
false;
114 bool HasSHSTK =
false;
119 bool HasCX16 =
false;
120 bool HasFXSR =
false;
121 bool HasXSAVE =
false;
122 bool HasXSAVEOPT =
false;
123 bool HasXSAVEC =
false;
124 bool HasXSAVES =
false;
125 bool HasMWAITX =
false;
126 bool HasCLZERO =
false;
127 bool HasCLDEMOTE =
false;
128 bool HasPCONFIG =
false;
130 bool HasCLFLUSHOPT =
false;
131 bool HasCLWB =
false;
132 bool HasMOVBE =
false;
133 bool HasMOVRS =
false;
134 bool HasPREFETCHI =
false;
135 bool HasRDPID =
false;
136 bool HasRDPRU =
false;
137 bool HasRetpolineExternalThunk =
false;
138 bool HasLAHFSAHF =
false;
139 bool HasWBNOINVD =
false;
140 bool HasWAITPKG =
false;
141 bool HasMOVDIRI =
false;
142 bool HasMOVDIR64B =
false;
143 bool HasPTWRITE =
false;
144 bool HasINVPCID =
false;
145 bool HasENQCMD =
false;
146 bool HasAVXVNNIINT16 =
false;
147 bool HasAMXFP16 =
false;
148 bool HasCMPCCXADD =
false;
149 bool HasRAOINT =
false;
150 bool HasAVXVNNIINT8 =
false;
151 bool HasAVXNECONVERT =
false;
153 bool HasWIDEKL =
false;
154 bool HasHRESET =
false;
155 bool HasAVXVNNI =
false;
156 bool HasAMXTILE =
false;
157 bool HasAMXINT8 =
false;
158 bool HasAMXBF16 =
false;
159 bool HasAMXCOMPLEX =
false;
160 bool HasAMXFP8 =
false;
161 bool HasAMXMOVRS =
false;
162 bool HasAMXTRANSPOSE =
false;
163 bool HasAMXAVX512 =
false;
164 bool HasAMXTF32 =
false;
165 bool HasSERIALIZE =
false;
166 bool HasTSXLDTRK =
false;
167 bool HasUSERMSR =
false;
168 bool HasUINTR =
false;
169 bool HasCRC32 =
false;
171 bool HasEGPR =
false;
172 bool HasPush2Pop2 =
false;
175 bool HasCCMP =
false;
179 bool HasInlineAsmUseGPR32 =
false;
180 bool HasBranchHint =
false;
183 llvm::X86::CPUKind CPU = llvm::X86::CK_None;
185 enum FPMathKind { FP_Default, FP_SSE, FP_387 } FPMath = FP_Default;
190 BFloat16Width = BFloat16Align = 16;
191 BFloat16Format = &llvm::APFloat::BFloat();
192 LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
195 HasUnalignedAccess =
true;
198 getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
204 return LongDoubleFormat == &llvm::APFloat::IEEEquad() ?
"g" :
"e";
209 return SSELevel == NoSSE ? LangOptions::FPEvalMethodKind::FEM_Extended
210 : LangOptions::FPEvalMethodKind::FEM_Source;
225 return RegName ==
"esp" || RegName ==
"rsp";
232 bool validateCpuSupports(StringRef FeatureStr)
const override;
234 bool validateCpuIs(StringRef FeatureStr)
const override;
236 bool validateCPUSpecificCPUDispatch(StringRef Name)
const override;
238 char CPUSpecificManglingCharacter(StringRef Name)
const override;
240 void getCPUSpecificCPUDispatchFeatures(
244 std::optional<unsigned> getCPUCacheLineSize()
const override;
246 bool validateAsmConstraint(
const char *&Name,
250 bool &HasSizeMismatch)
const override {
253 if (RegName ==
"esp" || RegName ==
"ebp") {
255 HasSizeMismatch = RegSize != 32;
262 bool validateOutputSize(
const llvm::StringMap<bool> &FeatureMap,
263 StringRef Constraint,
unsigned Size)
const override;
265 bool validateInputSize(
const llvm::StringMap<bool> &FeatureMap,
266 StringRef Constraint,
unsigned Size)
const override;
270 if (CPU == llvm::X86::CK_None || CPU >= llvm::X86::CK_PentiumPro)
272 return TargetInfo::checkCFProtectionReturnSupported(Diags);
277 if (CPU == llvm::X86::CK_None || CPU >= llvm::X86::CK_PentiumPro)
279 return TargetInfo::checkCFProtectionBranchSupported(Diags);
282 virtual bool validateOperandSize(
const llvm::StringMap<bool> &FeatureMap,
283 StringRef Constraint,
unsigned Size)
const;
285 std::string convertConstraint(
const char *&Constraint)
const override;
287 return "~{dirflag},~{fpsr},~{flags}";
292 StringRef::iterator I,
E;
293 for (I = Constraint.begin(),
E = Constraint.end(); I !=
E; ++I) {
294 if (isalpha(*I) || *I ==
'@')
318 if ((++I !=
E) && ((*I ==
'0') || (*I ==
'z')))
334 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
335 bool Enabled)
const final;
340 const std::vector<std::string> &FeaturesVec)
const override;
342 bool isValidFeatureName(StringRef Name)
const override;
344 bool hasFeature(StringRef Feature)
const final;
346 bool handleTargetFeatures(std::vector<std::string> &Features,
350 if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX512F)
352 if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX)
354 if (getTriple().getArch() == llvm::Triple::x86 && !HasMMX)
364 bool Only64Bit = getTriple().getArch() != llvm::Triple::x86;
365 return llvm::X86::parseArchX86(Name, Only64Bit) != llvm::X86::CK_None;
369 if (Name ==
"generic")
375 return llvm::X86::parseTuneCPU(Name) != llvm::X86::CK_None;
381 bool setCPU(
const std::string &Name)
override {
382 bool Only64Bit = getTriple().getArch() != llvm::Triple::x86;
383 CPU = llvm::X86::parseArchX86(Name, Only64Bit);
384 return CPU != llvm::X86::CK_None;
389 bool setFPMath(StringRef Name)
override;
392 return getTriple().getArch() != llvm::Triple::x86;
428 unsigned TargetAddrSpace = getTargetAddressSpace(AS);
431 if (TargetAddrSpace ==
ptr64)
437 return getPointerWidthV(AddrSpace);
447 DoubleAlign = LongLongAlign = 32;
448 LongDoubleWidth = 96;
449 LongDoubleAlign = 32;
451 resetDataLayout(Triple.isOSBinFormatMachO()
452 ?
"e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:"
453 "128-f64:32:64-f80:32-n8:16:32-S128"
454 :
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:"
455 "128-f64:32:64-f80:32-n8:16:32-S128",
456 Triple.isOSBinFormatMachO() ?
"_" :
"");
457 SizeType = UnsignedInt;
458 PtrDiffType = SignedInt;
459 IntPtrType = SignedInt;
463 RealTypeUsesObjCFPRetMask =
464 (
unsigned)(FloatModeKind::Float | FloatModeKind::Double |
465 FloatModeKind::LongDouble);
468 MaxAtomicPromoteWidth = 64;
469 MaxAtomicInlineWidth = 32;
473 return TargetInfo::CharPtrBuiltinVaList;
485 StringRef Constraint,
unsigned Size)
const override {
486 switch (Constraint[0]) {
503 return X86TargetInfo::validateOperandSize(FeatureMap, Constraint, Size);
508 MaxAtomicInlineWidth = 64;
515 return llvm::IntegerType::MAX_INT_BITS;
531 SizeType = UnsignedLong;
532 IntPtrType = SignedLong;
533 PtrDiffType = SignedLong;
542 LongDoubleWidth = 128;
543 LongDoubleAlign = 128;
545 MaxVectorAlign = 256;
547 llvm::Triple
T = llvm::Triple(Triple);
549 UseSignedCharForObjCBool =
false;
550 SizeType = UnsignedLong;
551 IntPtrType = SignedLong;
552 resetDataLayout(
"e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-"
553 "f64:32:64-f80:128-n8:16:32-S128",
555 HasAlignMac68kSupport =
true;
576 DoubleAlign = LongLongAlign = 64;
578 getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
579 bool IsMSVC = getTriple().isWindowsMSVCEnvironment();
580 std::string Layout = IsWinCOFF ?
"e-m:x" :
"e-m:e";
581 Layout +=
"-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-";
582 Layout += IsMSVC ?
"f80:128" :
"f80:32";
583 Layout +=
"-n8:16:32-a:0:32-S32";
584 resetDataLayout(Layout, IsWinCOFF ?
"_" :
"");
595 LongDoubleWidth = LongDoubleAlign = 64;
596 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
601 WindowsX86_32TargetInfo::getTargetDefines(Opts, Builder);
605 Builder.defineMacro(
"_M_IX86",
"600");
620 WindowsX86_32TargetInfo::getTargetDefines(Opts, Builder);
621 Builder.defineMacro(
"_X86_");
630 this->WCharType = TargetInfo::UnsignedShort;
631 DoubleAlign = LongLongAlign = 64;
632 resetDataLayout(
"e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-"
633 "i128:128-f80:32-n8:16:32-a:0:32-S32",
639 X86_32TargetInfo::getTargetDefines(Opts, Builder);
640 Builder.defineMacro(
"_X86_");
641 Builder.defineMacro(
"__CYGWIN__");
642 Builder.defineMacro(
"__CYGWIN32__");
646 Builder.defineMacro(
"_GNU_SOURCE");
660 Builder.defineMacro(
"__INTEL__");
669 LongDoubleWidth = 64;
670 DefaultAlignForAttributeAligned = 32;
671 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
672 resetDataLayout(
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:32-"
673 "f64:32-f128:32-n8:16:32-a:0:32-S32");
674 WIntType = UnsignedInt;
679 return CC ==
CC_C ? CCCR_OK : CCCR_Warning;
684 X86_32TargetInfo::getTargetDefines(Opts, Builder);
685 Builder.defineMacro(
"__iamcu");
686 Builder.defineMacro(
"__iamcu__");
697 SizeType = UnsignedLong;
698 IntPtrType = SignedLong;
699 PtrDiffType = SignedLong;
704 X86_32TargetInfo::getTargetDefines(Opts, Builder);
705 Builder.defineMacro(
"__INTEL__");
706 Builder.defineMacro(
"__rtems__");
715 const bool IsX32 = getTriple().isX32();
717 getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
718 LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 : 64;
719 LongDoubleWidth = 128;
720 LongDoubleAlign = 128;
721 LargeArrayMinWidth = 128;
722 LargeArrayAlign = 128;
724 SizeType = IsX32 ? UnsignedInt : UnsignedLong;
725 PtrDiffType = IsX32 ? SignedInt : SignedLong;
726 IntPtrType = IsX32 ? SignedInt : SignedLong;
727 IntMaxType = IsX32 ? SignedLongLong : SignedLong;
728 Int64Type = IsX32 ? SignedLongLong : SignedLong;
732 resetDataLayout(IsX32 ?
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
733 "i64:64-i128:128-f80:128-n8:16:32:64-S128"
734 : IsWinCOFF ?
"e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:"
735 "64-i128:128-f80:128-n8:16:32:64-S128"
736 :
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:"
737 "64-i128:128-f80:128-n8:16:32:64-S128");
740 RealTypeUsesObjCFPRetMask = (
unsigned)FloatModeKind::LongDouble;
743 ComplexLongDoubleUsesFP2Ret =
true;
746 HasBuiltinMSVaList =
true;
749 MaxAtomicPromoteWidth = 128;
750 MaxAtomicInlineWidth = 64;
754 return TargetInfo::X86_64ABIBuiltinVaList;
796 bool &HasSizeMismatch)
const override {
799 if (RegName ==
"rsp" || RegName ==
"rbp") {
801 HasSizeMismatch = RegSize != 64;
806 return X86TargetInfo::validateGlobalRegisterVariable(RegName, RegSize,
812 MaxAtomicInlineWidth = 128;
819 return llvm::IntegerType::MAX_INT_BITS;
829 this->TheCXXABI.set(TargetCXXABI::Microsoft);
831 this->resetDataLayout(
"e-m:w-p270:32:32-p271:32:32-p272:64:64-"
832 "i64:64-i128:128-f80:128-n8:16:32:64-S128");
836 return TargetInfo::CharPtrBuiltinVaList;
851 return CCK_MicrosoftWin64;
861 LongWidth = LongAlign = 32;
862 DoubleAlign = LongLongAlign = 64;
863 IntMaxType = SignedLongLong;
864 Int64Type = SignedLongLong;
865 SizeType = UnsignedLongLong;
866 PtrDiffType = SignedLongLong;
867 IntPtrType = SignedLongLong;
871 return TargetInfo::CharPtrBuiltinVaList;
905 LongDoubleWidth = LongDoubleAlign = 64;
906 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
911 WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
912 Builder.defineMacro(
"_M_X64",
"100");
913 Builder.defineMacro(
"_M_AMD64",
"100");
918 return CCK_MicrosoftWin64;
930 LongDoubleWidth = LongDoubleAlign = 128;
931 LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
941 this->WCharType = TargetInfo::UnsignedShort;
942 TLSSupported =
false;
947 X86_64TargetInfo::getTargetDefines(Opts, Builder);
948 Builder.defineMacro(
"__x86_64__");
949 Builder.defineMacro(
"__CYGWIN__");
950 Builder.defineMacro(
"__CYGWIN64__");
954 Builder.defineMacro(
"_GNU_SOURCE");
963 Int64Type = SignedLongLong;
965 llvm::Triple
T = llvm::Triple(Triple);
967 UseSignedCharForObjCBool =
false;
968 resetDataLayout(
"e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-"
969 "f80:128-n8:16:32:64-S128",
990 IntMaxType = SignedLongLong;
991 Int64Type = SignedLongLong;
1002 LongDoubleWidth = 64;
1003 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
1013 LongDoubleFormat = &llvm::APFloat::IEEEquad();
1024 LongDoubleWidth = 64;
1025 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
1035 LongDoubleFormat = &llvm::APFloat::IEEEquad();
Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.
static unsigned getFMVPriority(const TargetInfo &TI, const CodeGenFunction::FMVResolverOption &RO)
static unsigned getCharWidth(tok::TokenKind kind, const TargetInfo &Target)
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.
FPEvalMethodKind
Possible float expression evaluation method choices.
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.
AndroidX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
AndroidX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
CygwinX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
CygwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
DarwinI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
DarwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
HaikuX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
MCUX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool allowsLargerPreferedTypeAlignment() const override
Whether target allows to overalign ABI-specified preferred alignment.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
MicrosoftX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const override
MicrosoftX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
MinGWX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
MinGWX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
NetBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
OHOSX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
OHOSX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
OpenBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
OpenBSDX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
RTEMSX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this parti...
UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
BuiltinVaListKind getBuiltinVaListKind() const override
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const override
WindowsX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
WindowsX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
BuiltinVaListKind getBuiltinVaListKind() const override
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
bool isSPRegName(StringRef RegName) const override
bool isValidTuneCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name for tuning.
bool supportsCpuSupports() const override
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
bool setCPU(const std::string &Name) override
Target the specified CPU.
X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
bool supportsExtendIntArgs() const override
Whether the option -fextend-arguments={32,64} is supported on the target.
CallingConv getDefaultCallingConv() const override
Gets the default calling convention for the given target and declaration context.
bool useFP16ConversionIntrinsics() const override
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
bool hasSjLjLowering() const override
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm....
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
bool supportsCpuIs() const override
bool supportsCpuInit() const override
bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const override
Check if the target supports CFProtection branch.
StringRef getConstraintRegister(StringRef Constraint, StringRef Expression) const override
Extracts a register from the passed constraint (if it is a single-register constraint) and the asm la...
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
bool supportSourceEvalMethod() const override
bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const override
Check if the target supports CFProtection return.
LangOptions::FPEvalMethodKind getFPEvalMethod() const override
Return the value for the C99 FLT_EVAL_METHOD macro.
uint64_t getPointerWidthV(LangAS AS) const override
void setSupportedOpenCLOpts() override
Set supported OpenCL extensions and optional core features.
bool supportsTargetAttributeTune() const override
Determine whether this TargetInfo supports tune in target attribute.
const char * getLongDoubleMangling() const override
Return the mangled code of long double.
bool checkArithmeticFenceSupported() const override
Controls if __arithmetic_fence is supported in the targeted backend.
bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
Validate register name used for global register variables.
StringRef getABI() const override
Get the ABI currently in use.
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
uint64_t getPointerAlignV(LangAS AddrSpace) const override
X86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
size_t getMaxBitIntWidth() const override
void setMaxAtomicWidth() override
Set the maximum inline or promote width lock-free atomic operation for the given target.
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool validateOperandSize(const llvm::StringMap< bool > &FeatureMap, StringRef Constraint, unsigned Size) const override
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
Validate register name used for global register variables.
bool hasInt128Type() const override
Determine whether the __int128 type is supported on this target.
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
CallingConv getDefaultCallingConv() const override
Gets the default calling convention for the given target and declaration context.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
void setMaxAtomicWidth() override
Set the maximum inline or promote width lock-free atomic operation for the given target.
size_t getMaxBitIntWidth() const override
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
unsigned getUnwindWordWidth() const override
unsigned getRegisterWidth() const override
Return the "preferred" register width on this target.
Defines the clang::TargetInfo interface.
static const unsigned X86AddrSpaceMap[]
LLVM_LIBRARY_VISIBILITY void addCygMingDefines(const clang::LangOptions &Opts, clang::MacroBuilder &Builder)
LLVM_LIBRARY_VISIBILITY void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName, const clang::LangOptions &Opts)
Define a macro name and standard variants.
The JSON file list parser is used to communicate input to InstallAPI.
LangAS
Defines the address space values used by the address space qualifier of QualType.
const FunctionProtoType * T
CallingConv
CallingConv - Specifies the calling convention that a function uses.