clang  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
clang::targets::X86TargetInfo Class Reference

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/Basic/Targets/X86.h"

Inheritance diagram for clang::targets::X86TargetInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::targets::X86TargetInfo:
Collaboration graph
[legend]

Public Member Functions

 X86TargetInfo (const llvm::Triple &Triple, const TargetOptions &)
 
unsigned getFloatEvalMethod () const override
 Return the value for the C99 FLT_EVAL_METHOD macro. More...
 
ArrayRef< const char * > getGCCRegNames () const override
 
ArrayRef< TargetInfo::GCCRegAliasgetGCCRegAliases () const override
 
ArrayRef< TargetInfo::AddlRegNamegetGCCAddlRegNames () const override
 
bool validateCpuSupports (StringRef Name) const override
 
bool validateCpuIs (StringRef Name) const override
 
bool validateAsmConstraint (const char *&Name, TargetInfo::ConstraintInfo &info) const override
 
bool validateGlobalRegisterVariable (StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
 Validate register name used for global register variables. More...
 
bool validateOutputSize (StringRef Constraint, unsigned Size) const override
 
bool validateInputSize (StringRef Constraint, unsigned Size) const override
 
virtual bool validateOperandSize (StringRef Constraint, unsigned Size) const
 
std::string convertConstraint (const char *&Constraint) const override
 
const char * getClobbers () const override
 Returns a string of target-specific clobbers, in LLVM format. More...
 
StringRef getConstraintRegister (const StringRef &Constraint, const StringRef &Expression) const override
 
bool useFP16ConversionIntrinsics () const override
 Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16. More...
 
void getTargetDefines (const LangOptions &Opts, MacroBuilder &Builder) const override
 X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this particular subtarget. More...
 
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. More...
 
bool initFeatureMap (llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeaturesVec) const override
 Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target. More...
 
bool isValidFeatureName (StringRef Name) const override
 Determine whether this TargetInfo supports the given feature. More...
 
bool hasFeature (StringRef Feature) const override
 Determine whether the given target has the given feature. More...
 
bool handleTargetFeatures (std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
 handleTargetFeatures - Perform initialization based on the user configured set of features. More...
 
StringRef getABI () const override
 Get the ABI currently in use. More...
 
bool isValidCPUName (StringRef Name) const override
 brief Determine whether this TargetInfo supports the given CPU name. More...
 
bool setCPU (const std::string &Name) override
 Target the specified CPU. More...
 
bool setFPMath (StringRef Name) override
 Use the specified unit for FP math. More...
 
CallingConvCheckResult checkCallingConvention (CallingConv CC) const override
 Determines whether a given calling convention is valid for the target. More...
 
CallingConv getDefaultCallingConv (CallingConvMethodType MT) const override
 Gets the default calling convention for the given target and declaration context. More...
 
bool hasSjLjLowering () const override
 Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp. More...
 
void setSupportedOpenCLOpts () override
 Set supported OpenCL extensions and optional core features. More...
 
- Public Member Functions inherited from clang::TargetInfo
virtual ~TargetInfo ()
 
TargetOptionsgetTargetOpts () const
 Retrieve the target options. More...
 
IntType getSizeType () const
 
IntType getSignedSizeType () const
 
IntType getIntMaxType () const
 
IntType getUIntMaxType () const
 
IntType getPtrDiffType (unsigned AddrSpace) const
 
IntType getUnsignedPtrDiffType (unsigned AddrSpace) const
 
IntType getIntPtrType () const
 
IntType getUIntPtrType () const
 
IntType getWCharType () const
 
IntType getWIntType () const
 
IntType getChar16Type () const
 
IntType getChar32Type () const
 
IntType getInt64Type () const
 
IntType getUInt64Type () const
 
IntType getSigAtomicType () const
 
IntType getProcessIDType () const
 
unsigned getTypeWidth (IntType T) const
 Return the width (in bits) of the specified integer type enum. More...
 
virtual IntType getIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return integer type with specified width. More...
 
virtual IntType getLeastIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return the smallest integer type with at least the specified width. More...
 
RealType getRealTypeByWidth (unsigned BitWidth) const
 Return floating point type with specified width. More...
 
unsigned getTypeAlign (IntType T) const
 Return the alignment (in bits) of the specified integer type enum. More...
 
uint64_t getPointerWidth (unsigned AddrSpace) const
 Return the width of pointers on this target, for the specified address space. More...
 
uint64_t getPointerAlign (unsigned AddrSpace) const
 
virtual uint64_t getMaxPointerWidth () const
 Return the maximum width of pointers on this target. More...
 
virtual uint64_t getNullPointerValue (LangAS AddrSpace) const
 Get integer value for null pointer. More...
 
unsigned getBoolWidth () const
 Return the size of '_Bool' and C++ 'bool' for this target, in bits. More...
 
unsigned getBoolAlign () const
 Return the alignment of '_Bool' and C++ 'bool' for this target. More...
 
unsigned getCharWidth () const
 
unsigned getCharAlign () const
 
unsigned getShortWidth () const
 Return the size of 'signed short' and 'unsigned short' for this target, in bits. More...
 
unsigned getShortAlign () const
 Return the alignment of 'signed short' and 'unsigned short' for this target. More...
 
unsigned getIntWidth () const
 getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits. More...
 
unsigned getIntAlign () const
 
unsigned getLongWidth () const
 getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits. More...
 
unsigned getLongAlign () const
 
unsigned getLongLongWidth () const
 getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits. More...
 
unsigned getLongLongAlign () const
 
virtual bool hasInt128Type () const
 Determine whether the __int128 type is supported on this target. More...
 
virtual bool hasFloat128Type () const
 Determine whether the __float128 type is supported on this target. More...
 
unsigned getSuitableAlign () const
 Return the alignment that is suitable for storing any object with a fundamental alignment requirement. More...
 
unsigned getDefaultAlignForAttributeAligned () const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified. More...
 
unsigned getMinGlobalAlign () const
 getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes. More...
 
unsigned getNewAlign () const
 Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is guaranteed to produce a correctly-aligned pointer. More...
 
unsigned getWCharWidth () const
 getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits. More...
 
unsigned getWCharAlign () const
 
unsigned getChar16Width () const
 getChar16Width/Align - Return the size of 'char16_t' for this target, in bits. More...
 
unsigned getChar16Align () const
 
unsigned getChar32Width () const
 getChar32Width/Align - Return the size of 'char32_t' for this target, in bits. More...
 
unsigned getChar32Align () const
 
unsigned getHalfWidth () const
 getHalfWidth/Align/Format - Return the size/align/format of 'half'. More...
 
unsigned getHalfAlign () const
 
const llvm::fltSemantics & getHalfFormat () const
 
unsigned getFloatWidth () const
 getFloatWidth/Align/Format - Return the size/align/format of 'float'. More...
 
unsigned getFloatAlign () const
 
const llvm::fltSemantics & getFloatFormat () const
 
unsigned getDoubleWidth () const
 getDoubleWidth/Align/Format - Return the size/align/format of 'double'. More...
 
unsigned getDoubleAlign () const
 
const llvm::fltSemantics & getDoubleFormat () const
 
unsigned getLongDoubleWidth () const
 getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'. More...
 
unsigned getLongDoubleAlign () const
 
const llvm::fltSemantics & getLongDoubleFormat () const
 
unsigned getFloat128Width () const
 getFloat128Width/Align/Format - Return the size/align/format of '__float128'. More...
 
unsigned getFloat128Align () const
 
const llvm::fltSemantics & getFloat128Format () const
 
virtual bool useFloat128ManglingForLongDouble () const
 Return true if the 'long double' type should be mangled like __float128. More...
 
unsigned getLargeArrayMinWidth () const
 
unsigned getLargeArrayAlign () const
 
unsigned getMaxAtomicPromoteWidth () const
 Return the maximum width lock-free atomic operation which will ever be supported for the given target. More...
 
unsigned getMaxAtomicInlineWidth () const
 Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target. More...
 
virtual void setMaxAtomicWidth ()
 Set the maximum inline or promote width lock-free atomic operation for the given target. More...
 
virtual bool hasBuiltinAtomic (uint64_t AtomicSizeInBits, uint64_t AlignmentInBits) const
 Returns true if the given target supports lock-free atomic operations at the specified width and alignment. More...
 
unsigned getMaxVectorAlign () const
 Return the maximum vector alignment supported for the given target. More...
 
unsigned getSimdDefaultAlign () const
 Return default simd alignment for the given target. More...
 
unsigned getIntMaxTWidth () const
 Return the size of intmax_t and uintmax_t for this target, in bits. More...
 
virtual unsigned getUnwindWordWidth () const
 
virtual unsigned getRegisterWidth () const
 Return the "preferred" register width on this target. More...
 
const char * getMCountName () const
 Returns the name of the mcount instrumentation function. More...
 
bool useSignedCharForObjCBool () const
 Check if the Objective-C built-in boolean type should be signed char. More...
 
void noSignedCharForObjCBool ()
 
bool useBitFieldTypeAlignment () const
 Check whether the alignment of bit-field types is respected when laying out structures. More...
 
bool useZeroLengthBitfieldAlignment () const
 Check whether zero length bitfields should force alignment of the next member. More...
 
unsigned getZeroLengthBitfieldBoundary () const
 Get the fixed alignment value in bits for a member that follows a zero length bitfield. More...
 
bool useExplicitBitFieldAlignment () const
 Check whether explicit bitfield alignment attributes should be. More...
 
bool hasAlignMac68kSupport () const
 Check whether this target support '#pragma options align=mac68k'. More...
 
const char * getTypeConstantSuffix (IntType T) const
 Return the constant suffix for the specified integer type enum. More...
 
bool useObjCFPRetForRealType (RealType T) const
 Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target. More...
 
bool useObjCFP2RetForComplexLongDouble () const
 Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target. More...
 
bool useAddressSpaceMapMangling () const
 Specify if mangling based on address space map should be used or not for language specific address spaces. More...
 
virtual ArrayRef< Builtin::InfogetTargetBuiltins () const =0
 Return information about target-specific builtins for the current primary target, and info about which builtins are non-portable across the current set of primary and secondary targets. More...
 
virtual bool isCLZForZeroUndef () const
 The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for zero inputs, but on targets that support these operations in a way that provides well-defined results for zero without loss of performance, it is a good idea to avoid optimizing based on that undef behavior. More...
 
virtual BuiltinVaListKind getBuiltinVaListKind () const =0
 Returns the kind of __builtin_va_list type that should be used with this target. More...
 
bool hasBuiltinMSVaList () const
 Returns whether or not type __builtin_ms_va_list type is available on this target. More...
 
bool isRenderScriptTarget () const
 Returns true for RenderScript. More...
 
bool isValidClobber (StringRef Name) const
 Returns whether the passed in string is a valid clobber in an inline asm statement. More...
 
bool isValidGCCRegisterName (StringRef Name) const
 Returns whether the passed in string is a valid register name according to GCC. More...
 
StringRef getNormalizedGCCRegisterName (StringRef Name, bool ReturnCanonical=false) const
 Returns the "normalized" GCC register name. More...
 
bool validateOutputConstraint (ConstraintInfo &Info) const
 
bool validateInputConstraint (MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
 
virtual bool validateConstraintModifier (StringRef, char, unsigned, std::string &) const
 
bool resolveSymbolicName (const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
 
virtual bool isNan2008 () const
 Returns true if NaN encoding is IEEE 754-2008. More...
 
const llvm::Triple & getTriple () const
 Returns the target triple of the primary target. More...
 
const llvm::DataLayout & getDataLayout () const
 
virtual bool hasProtectedVisibility () const
 Does this target support "protected" visibility? More...
 
virtual std::string isValidSectionSpecifier (StringRef SR) const
 An optional hook that targets can implement to perform semantic checking on attribute((section("foo"))) specifiers. More...
 
virtual void adjust (LangOptions &Opts)
 Set forced language options. More...
 
virtual void adjustTargetOptions (const CodeGenOptions &CGOpts, TargetOptions &TargetOpts) const
 Adjust target options based on codegen options. More...
 
TargetCXXABI getCXXABI () const
 Get the C++ ABI currently in use. More...
 
virtual bool setABI (const std::string &Name)
 Use the specified ABI. More...
 
unsigned getRegParmMax () const
 
bool isTLSSupported () const
 Whether the target supports thread-local storage. More...
 
unsigned short getMaxTLSAlign () const
 Return the maximum alignment (in bits) of a TLS variable. More...
 
bool isVLASupported () const
 Whether target supports variable-length arrays. More...
 
bool isSEHTrySupported () const
 Whether the target supports SEH __try. More...
 
bool hasNoAsmVariants () const
 Return true if {|} are normal characters in the asm string. More...
 
virtual int getEHDataRegisterNumber (unsigned RegNo) const
 Return the register number that __builtin_eh_return_regno would return with the specified argument. More...
 
virtual const char * getStaticInitSectionSpecifier () const
 Return the section to use for C++ static initialization functions. More...
 
const LangASMapgetAddressSpaceMap () const
 
virtual llvm::Optional< LangASgetConstantAddressSpace () const
 Return an AST address space which can be used opportunistically for constant global memory. More...
 
StringRef getPlatformName () const
 Retrieve the name of the platform as it is used in the availability attribute. More...
 
VersionTuple getPlatformMinVersion () const
 Retrieve the minimum desired version of the platform, to which the program should be compiled. More...
 
bool isBigEndian () const
 
bool isLittleEndian () const
 
virtual bool allowsLargerPreferedTypeAlignment () const
 Whether target allows to overalign ABI-specified preferred alignment. More...
 
virtual void setOpenCLExtensionOpts ()
 Set supported OpenCL extensions as written on command line. More...
 
OpenCLOptionsgetSupportedOpenCLOpts ()
 Get supported OpenCL extensions and optional core features. More...
 
const OpenCLOptionsgetSupportedOpenCLOpts () const
 Get const supported OpenCL extensions and optional core features. More...
 
virtual LangAS getOpenCLTypeAddrSpace (OpenCLTypeKind TK) const
 Get address space for OpenCL type. More...
 
virtual unsigned getVtblPtrAddressSpace () const
 
virtual Optional< unsigned > getDWARFAddressSpace (unsigned AddressSpace) const
 
virtual bool validateTarget (DiagnosticsEngine &Diags) const
 Check the target is valid after it is fully initialized. More...
 

Static Public Member Functions

static void setSSELevel (llvm::StringMap< bool > &Features, X86SSEEnum Level, bool Enabled)
 
static void setMMXLevel (llvm::StringMap< bool > &Features, MMX3DNowEnum Level, bool Enabled)
 
static void setXOPLevel (llvm::StringMap< bool > &Features, XOPEnum Level, bool Enabled)
 
static void setFeatureEnabledImpl (llvm::StringMap< bool > &Features, StringRef Name, bool Enabled)
 
- Static Public Member Functions inherited from clang::TargetInfo
static TargetInfoCreateTargetInfo (DiagnosticsEngine &Diags, const std::shared_ptr< TargetOptions > &Opts)
 Construct a target for the given options. More...
 
static IntType getCorrespondingUnsignedType (IntType T)
 
static bool isTypeSigned (IntType T)
 Returns true if the type is signed; false otherwise. More...
 
static const char * getTypeName (IntType T)
 Return the user string for the specified integer type enum. More...
 
static const char * getTypeFormatModifier (IntType T)
 Return the printf format modifier for the specified integer type enum. More...
 

Additional Inherited Members

- Public Types inherited from clang::TargetInfo
enum  IntType {
  NoInt = 0, SignedChar, UnsignedChar, SignedShort,
  UnsignedShort, SignedInt, UnsignedInt, SignedLong,
  UnsignedLong, SignedLongLong, UnsignedLongLong
}
 ===-— Target Data Type Query Methods ----------------------------—===// More...
 
enum  RealType {
  NoFloat = 255, Float = 0, Double, LongDouble,
  Float128
}
 
enum  BuiltinVaListKind {
  CharPtrBuiltinVaList = 0, VoidPtrBuiltinVaList, AArch64ABIBuiltinVaList, PNaClABIBuiltinVaList,
  PowerABIBuiltinVaList, X86_64ABIBuiltinVaList, AAPCSABIBuiltinVaList, SystemZBuiltinVaList
}
 The different kinds of __builtin_va_list types defined by the target implementation. More...
 
enum  CallingConvMethodType { CCMT_Unknown, CCMT_Member, CCMT_NonMember }
 
enum  CallingConvCheckResult { CCCR_OK, CCCR_Warning, CCCR_Ignore }
 
enum  OpenCLTypeKind {
  OCLTK_Default, OCLTK_ClkEvent, OCLTK_Event, OCLTK_Image,
  OCLTK_Pipe, OCLTK_Queue, OCLTK_ReserveID, OCLTK_Sampler
}
 
- Protected Member Functions inherited from clang::TargetInfo
 TargetInfo (const llvm::Triple &T)
 
void resetDataLayout (StringRef DL)
 
virtual uint64_t getPointerWidthV (unsigned AddrSpace) const
 
virtual uint64_t getPointerAlignV (unsigned AddrSpace) const
 
virtual enum IntType getPtrDiffTypeV (unsigned AddrSpace) const
 
- Protected Attributes inherited from clang::TargetInfo
bool BigEndian
 
bool TLSSupported
 
bool VLASupported
 
bool NoAsmVariants
 
bool HasFloat128
 
unsigned char PointerWidth
 
unsigned char PointerAlign
 
unsigned char BoolWidth
 
unsigned char BoolAlign
 
unsigned char IntWidth
 
unsigned char IntAlign
 
unsigned char HalfWidth
 
unsigned char HalfAlign
 
unsigned char FloatWidth
 
unsigned char FloatAlign
 
unsigned char DoubleWidth
 
unsigned char DoubleAlign
 
unsigned char LongDoubleWidth
 
unsigned char LongDoubleAlign
 
unsigned char Float128Align
 
unsigned char LargeArrayMinWidth
 
unsigned char LargeArrayAlign
 
unsigned char LongWidth
 
unsigned char LongAlign
 
unsigned char LongLongWidth
 
unsigned char LongLongAlign
 
unsigned char SuitableAlign
 
unsigned char DefaultAlignForAttributeAligned
 
unsigned char MinGlobalAlign
 
unsigned char MaxAtomicPromoteWidth
 
unsigned char MaxAtomicInlineWidth
 
unsigned short MaxVectorAlign
 
unsigned short MaxTLSAlign
 
unsigned short SimdDefaultAlign
 
unsigned short NewAlign
 
std::unique_ptr< llvm::DataLayout > DataLayout
 
const char * MCountName
 
const llvm::fltSemantics * HalfFormat
 
const llvm::fltSemantics * FloatFormat
 
const llvm::fltSemantics * DoubleFormat
 
const llvm::fltSemantics * LongDoubleFormat
 
const llvm::fltSemantics * Float128Format
 
unsigned char RegParmMax
 
unsigned char SSERegParmMax
 
TargetCXXABI TheCXXABI
 
const LangASMapAddrSpaceMap
 
StringRef PlatformName
 
VersionTuple PlatformMinVersion
 
unsigned HasAlignMac68kSupport: 1
 
unsigned RealTypeUsesObjCFPRet: 3
 
unsigned ComplexLongDoubleUsesFP2Ret: 1
 
unsigned HasBuiltinMSVaList: 1
 
unsigned IsRenderScriptTarget: 1
 
IntType SizeType
 
IntType IntMaxType
 
IntType PtrDiffType
 
IntType IntPtrType
 
IntType WCharType
 
IntType WIntType
 
IntType Char16Type
 
IntType Char32Type
 
IntType Int64Type
 
IntType SigAtomicType
 
IntType ProcessIDType
 
unsigned UseSignedCharForObjCBool: 1
 Whether Objective-C's built-in boolean type should be signed char. More...
 
unsigned UseBitFieldTypeAlignment: 1
 Control whether the alignment of bit-field types is respected when laying out structures. More...
 
unsigned UseZeroLengthBitfieldAlignment: 1
 Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield. More...
 
unsigned UseExplicitBitFieldAlignment: 1
 Whether explicit bit field alignment attributes are honored. More...
 
unsigned ZeroLengthBitfieldBoundary
 If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield, regardless of the zero length bitfield type. More...
 
bool UseAddrSpaceMapMangling
 Specify if mangling based on address space map should be used or not for language specific address spaces. More...
 

Detailed Description

Definition at line 28 of file X86.h.

Constructor & Destructor Documentation

◆ X86TargetInfo()

clang::targets::X86TargetInfo::X86TargetInfo ( const llvm::Triple &  Triple,
const TargetOptions  
)
inline

Definition at line 111 of file X86.h.

Member Function Documentation

◆ checkCallingConvention()

CallingConvCheckResult clang::targets::X86TargetInfo::checkCallingConvention ( CallingConv  CC) const
inlineoverridevirtual

Determines whether a given calling convention is valid for the target.

A calling convention can either be accepted, produce a warning and be substituted with the default calling convention, or (someday) produce an error (such as using thiscall on a non-instance function).

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::WindowsX86_64TargetInfo, clang::targets::X86_64TargetInfo, and clang::targets::MCUX86_32TargetInfo.

Definition at line 255 of file X86.h.

References clang::CC_C, clang::CC_IntelOclBicc, clang::CC_OpenCLKernel, clang::CC_Swift, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86ThisCall, and clang::CC_X86VectorCall.

◆ convertConstraint()

std::string X86TargetInfo::convertConstraint ( const char *&  Constraint) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1432 of file X86.cpp.

References PROC.

◆ getABI()

StringRef clang::targets::X86TargetInfo::getABI ( ) const
inlineoverridevirtual

Get the ABI currently in use.

Reimplemented from clang::TargetInfo.

Definition at line 234 of file X86.h.

◆ getClobbers()

const char* clang::targets::X86TargetInfo::getClobbers ( ) const
inlineoverridevirtual

Returns a string of target-specific clobbers, in LLVM format.

Implements clang::TargetInfo.

Definition at line 156 of file X86.h.

◆ getConstraintRegister()

StringRef clang::targets::X86TargetInfo::getConstraintRegister ( const StringRef &  Constraint,
const StringRef &  Expression 
) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 160 of file X86.h.

◆ getDefaultCallingConv()

CallingConv clang::targets::X86TargetInfo::getDefaultCallingConv ( CallingConvMethodType  MT) const
inlineoverridevirtual

Gets the default calling convention for the given target and declaration context.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::X86_64TargetInfo.

Definition at line 274 of file X86.h.

References clang::CC_C, and clang::CC_X86ThisCall.

◆ getFloatEvalMethod()

unsigned clang::targets::X86TargetInfo::getFloatEvalMethod ( ) const
inlineoverridevirtual

Return the value for the C99 FLT_EVAL_METHOD macro.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::NetBSDI386TargetInfo.

Definition at line 116 of file X86.h.

Referenced by clang::targets::NetBSDI386TargetInfo::getFloatEvalMethod().

◆ getGCCAddlRegNames()

ArrayRef< TargetInfo::AddlRegName > X86TargetInfo::getGCCAddlRegNames ( ) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1506 of file X86.cpp.

References clang::targets::AddlRegNames.

◆ getGCCRegAliases()

ArrayRef<TargetInfo::GCCRegAlias> clang::targets::X86TargetInfo::getGCCRegAliases ( ) const
inlineoverridevirtual

Implements clang::TargetInfo.

Definition at line 123 of file X86.h.

◆ getGCCRegNames()

ArrayRef< const char * > X86TargetInfo::getGCCRegNames ( ) const
overridevirtual

Implements clang::TargetInfo.

Definition at line 1502 of file X86.cpp.

References clang::targets::GCCRegNames.

◆ getTargetDefines()

void X86TargetInfo::getTargetDefines ( const LangOptions Opts,
MacroBuilder Builder 
) const
overridevirtual

◆ handleTargetFeatures()

bool X86TargetInfo::handleTargetFeatures ( std::vector< std::string > &  Features,
DiagnosticsEngine Diags 
)
overridevirtual

handleTargetFeatures - Perform initialization based on the user configured set of features.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::DarwinX86_64TargetInfo, and clang::targets::DarwinI386TargetInfo.

Definition at line 628 of file X86.cpp.

References hasFeature(), max(), and clang::DiagnosticsEngine::Report().

◆ hasFeature()

bool X86TargetInfo::hasFeature ( StringRef  Feature) const
overridevirtual

Determine whether the given target has the given feature.

Reimplemented from clang::TargetInfo.

Definition at line 1191 of file X86.cpp.

◆ hasSjLjLowering()

bool clang::targets::X86TargetInfo::hasSjLjLowering ( ) const
inlineoverridevirtual

Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.

Reimplemented from clang::TargetInfo.

Definition at line 278 of file X86.h.

◆ initFeatureMap()

bool X86TargetInfo::initFeatureMap ( llvm::StringMap< bool > &  Features,
DiagnosticsEngine Diags,
StringRef  CPU,
const std::vector< std::string > &  FeatureVec 
) const
overridevirtual

Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.

Returns
False on error (invalid features).

Reimplemented from clang::TargetInfo.

Definition at line 103 of file X86.cpp.

References clang::TargetInfo::initFeatureMap().

◆ isValidCPUName()

bool clang::targets::X86TargetInfo::isValidCPUName ( StringRef  Name) const
inlineoverridevirtual

brief Determine whether this TargetInfo supports the given CPU name.

Reimplemented from clang::TargetInfo.

Definition at line 245 of file X86.h.

◆ isValidFeatureName()

bool X86TargetInfo::isValidFeatureName ( StringRef  Feature) const
overridevirtual

Determine whether this TargetInfo supports the given feature.

Reimplemented from clang::TargetInfo.

Definition at line 1130 of file X86.cpp.

◆ setCPU()

bool clang::targets::X86TargetInfo::setCPU ( const std::string &  Name)
inlineoverridevirtual

Target the specified CPU.

Returns
False on error (invalid CPU name).

Reimplemented from clang::TargetInfo.

Definition at line 249 of file X86.h.

◆ setFeatureEnabled()

void clang::targets::X86TargetInfo::setFeatureEnabled ( llvm::StringMap< bool > &  Features,
StringRef  Name,
bool  Enabled 
) const
inlineoverridevirtual

Enable or disable a specific target feature; the feature name must be valid.

Reimplemented from clang::TargetInfo.

Definition at line 212 of file X86.h.

References hasFeature().

◆ setFeatureEnabledImpl()

void X86TargetInfo::setFeatureEnabledImpl ( llvm::StringMap< bool > &  Features,
StringRef  Name,
bool  Enabled 
)
static

Definition at line 543 of file X86.cpp.

◆ setFPMath()

bool X86TargetInfo::setFPMath ( StringRef  Name)
overridevirtual

Use the specified unit for FP math.

Returns
False on error (invalid unit name).

Reimplemented from clang::TargetInfo.

Definition at line 91 of file X86.cpp.

◆ setMMXLevel()

void X86TargetInfo::setMMXLevel ( llvm::StringMap< bool > &  Features,
MMX3DNowEnum  Level,
bool  Enabled 
)
static

Definition at line 475 of file X86.cpp.

◆ setSSELevel()

void X86TargetInfo::setSSELevel ( llvm::StringMap< bool > &  Features,
X86SSEEnum  Level,
bool  Enabled 
)
static

Definition at line 398 of file X86.cpp.

◆ setSupportedOpenCLOpts()

void clang::targets::X86TargetInfo::setSupportedOpenCLOpts ( )
inlineoverridevirtual

Set supported OpenCL extensions and optional core features.

Reimplemented from clang::TargetInfo.

Definition at line 280 of file X86.h.

◆ setXOPLevel()

void X86TargetInfo::setXOPLevel ( llvm::StringMap< bool > &  Features,
XOPEnum  Level,
bool  Enabled 
)
static

Definition at line 508 of file X86.cpp.

◆ useFP16ConversionIntrinsics()

bool clang::targets::X86TargetInfo::useFP16ConversionIntrinsics ( ) const
inlineoverridevirtual

Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.

FIXME: This function should be removed once all targets stop using the conversion intrinsics.

Reimplemented from clang::TargetInfo.

Definition at line 196 of file X86.h.

◆ validateAsmConstraint()

bool X86TargetInfo::validateAsmConstraint ( const char *&  Name,
TargetInfo::ConstraintInfo info 
) const
overridevirtual

Implements clang::TargetInfo.

Definition at line 1282 of file X86.cpp.

◆ validateCpuIs()

bool X86TargetInfo::validateCpuIs ( StringRef  Name) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1271 of file X86.cpp.

References X86_VENDOR.

◆ validateCpuSupports()

bool X86TargetInfo::validateCpuSupports ( StringRef  Name) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1260 of file X86.cpp.

References X86_FEATURE_COMPAT.

◆ validateGlobalRegisterVariable()

bool clang::targets::X86TargetInfo::validateGlobalRegisterVariable ( StringRef  RegName,
unsigned  RegSize,
bool HasSizeMismatch 
) const
inlineoverridevirtual

Validate register name used for global register variables.

This function returns true if the register passed in RegName can be used for global register variables on this target. In addition, it returns true in HasSizeMismatch if the size of the register doesn't match the variable size passed in RegSize.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::X86_64TargetInfo.

Definition at line 136 of file X86.h.

Referenced by clang::targets::X86_64TargetInfo::validateGlobalRegisterVariable().

◆ validateInputSize()

bool X86TargetInfo::validateInputSize ( StringRef  Constraint,
unsigned  Size 
) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1376 of file X86.cpp.

◆ validateOperandSize()

bool X86TargetInfo::validateOperandSize ( StringRef  Constraint,
unsigned  Size 
) const
virtual

Reimplemented in clang::targets::X86_32TargetInfo.

Definition at line 1381 of file X86.cpp.

Referenced by clang::targets::X86_32TargetInfo::validateOperandSize().

◆ validateOutputSize()

bool X86TargetInfo::validateOutputSize ( StringRef  Constraint,
unsigned  Size 
) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1367 of file X86.cpp.


The documentation for this class was generated from the following files: