clang 8.0.0

Namespaces | Macros | Functions | Variables
X86.cpp File Reference
`#include "X86.h"`
`#include "clang/Basic/Builtins.h"`
`#include "clang/Basic/Diagnostic.h"`
`#include "clang/Basic/TargetBuiltins.h"`
`#include "llvm/ADT/StringExtras.h"`
`#include "llvm/ADT/StringRef.h"`
`#include "llvm/ADT/StringSwitch.h"`
`#include "llvm/Support/TargetParser.h"`
`#include "clang/Basic/BuiltinsX86.def"`
`#include "clang/Basic/BuiltinsX86_64.def"`
`#include "llvm/Support/X86TargetParser.def"`
`#include "clang/Basic/X86Target.def"`
Include dependency graph for X86.cpp:

Go to the source code of this file.

## Namespaces
| clang
| Dataflow Directional Tag Classes.
| clang::targets

## Macros
#define | BUILTIN(ID, TYPE, ATTRS) {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
#define | TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, FEATURE},
#define | TARGET_HEADER_BUILTIN(ID, TYPE, ATTRS, HEADER, LANGS, FEATURE) {#ID, TYPE, ATTRS, HEADER, LANGS, FEATURE},
#define | BUILTIN(ID, TYPE, ATTRS) {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
#define | TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, FEATURE},
#define | TARGET_HEADER_BUILTIN(ID, TYPE, ATTRS, HEADER, LANGS, FEATURE) {#ID, TYPE, ATTRS, HEADER, LANGS, FEATURE},
#define | X86_FEATURE_COMPAT(VAL, ENUM, STR) .Case(STR, true)
#define | X86_FEATURE_COMPAT(VAL, ENUM, STR) .Case(STR, llvm::X86::ENUM)
#define | FEATURE(FEAT) FEAT,
#define | FEATURE(FEAT)
#define | PROC_WITH_FEAT(ENUM, STR, IS64, KEY_FEAT)
#define | CPU_SPECIFIC(NAME, MANGLING, FEATURES) .Case(NAME, true)
#define | CPU_SPECIFIC_ALIAS(NEW_NAME, NAME) .Case(NEW_NAME, true)
#define | CPU_SPECIFIC_ALIAS(NEW_NAME, NAME) .Case(NEW_NAME, NAME)
#define | CPU_SPECIFIC(NAME, MANGLING, FEATURES) .Case(NAME, MANGLING)
#define | CPU_SPECIFIC(NAME, MANGLING, FEATURES) .Case(NAME, FEATURES)
#define | PROC(ENUM, STRING, IS64BIT)
#define | X86_VENDOR(ENUM, STRING) .Case(STRING, true)
#define | X86_CPU_TYPE_COMPAT_WITH_ALIAS(ARCHNAME, ENUM, STR, ALIAS) .Cases(STR, ALIAS, true)
#define | X86_CPU_TYPE_COMPAT(ARCHNAME, ENUM, STR) .Case(STR, true)
#define | X86_CPU_SUBTYPE_COMPAT(ARCHNAME, ENUM, STR) .Case(STR, true)
#define | PROC(ENUM, STRING, IS64BIT)
#define | PROC_ALIAS(ENUM, ALIAS)
#define | PROC(ENUM, STRING, IS64BIT) .Case(STRING, CK_##ENUM)
#define | PROC_ALIAS(ENUM, ALIAS) .Case(ALIAS, CK_##ENUM)

## Functions
static llvm::X86::ProcessorFeatures | getFeature (StringRef Name)
static unsigned | getFeaturePriority (llvm::X86::ProcessorFeatures Feat)
static StringRef | CPUSpecificCPUDispatchNameDealias (StringRef Name)

## Variables
const Builtin::Info | clang::targets::BuiltinInfoX86 []
static const char *const | clang::targets::GCCRegNames []
const TargetInfo::AddlRegName | clang::targets::AddlRegNames []

## Macro Definition Documentation

## ◆ BUILTIN [1/2]

#define BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS
| ) |  | {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},

## ◆ BUILTIN [2/2]

#define BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS
| ) |  | {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},

## ◆ CPU_SPECIFIC [1/3]

#define CPU_SPECIFIC | ( |  | NAME,
|  |  | MANGLING,
|  |  | FEATURES
| ) |  | .Case(NAME, true)

## ◆ CPU_SPECIFIC [2/3]

#define CPU_SPECIFIC | ( |  | NAME,
|  |  | MANGLING,
|  |  | FEATURES
| ) |  | .Case(NAME, MANGLING)

## ◆ CPU_SPECIFIC [3/3]

#define CPU_SPECIFIC | ( |  | NAME,
|  |  | MANGLING,
|  |  | FEATURES
| ) |  | .Case(NAME, FEATURES)

## ◆ CPU_SPECIFIC_ALIAS [1/2]

#define CPU_SPECIFIC_ALIAS | ( |  | NEW_NAME,
|  |  | NAME
| ) |  | .Case(NEW_NAME, true)

## ◆ CPU_SPECIFIC_ALIAS [2/2]

#define CPU_SPECIFIC_ALIAS | ( |  | NEW_NAME,
|  |  | NAME
| ) |  | .Case(NEW_NAME, NAME)

## ◆ FEATURE [1/2]

#define FEATURE | ( |  | FEAT | ) | FEAT,

## ◆ FEATURE [2/2]

#define FEATURE | ( |  | FEAT | ) |

Value:
case llvm::X86::FEAT: \
return static_cast<unsigned>(FeatPriority::FEAT);

## ◆ PROC [1/4]

#define PROC | ( |  | ENUM,
|  |  | STRING,
|  |  | IS64BIT
| ) |  |

Value:
case CK_##ENUM: \
return STRING;

Referenced by clang::targets::X86TargetInfo::getCPUKind().

## ◆ PROC [2/4]

#define PROC | ( |  | ENUM,
|  |  | STRING,
|  |  | IS64BIT
| ) |  |

Value:
case CK_##ENUM: \
return IS64BIT || getTriple().getArch() == llvm::Triple::x86;

## ◆ PROC [3/4]

#define PROC | ( |  | ENUM,
|  |  | STRING,
|  |  | IS64BIT
| ) |  |

Value:
if (IS64BIT || getTriple().getArch() == llvm::Triple::x86) \
Values.emplace_back(STRING);

## ◆ PROC [4/4]

#define PROC | ( |  | ENUM,
|  |  | STRING,
|  |  | IS64BIT
| ) |  | .Case(STRING, CK_##ENUM)

## ◆ PROC_ALIAS [1/2]

#define PROC_ALIAS | ( |  | ENUM,
|  |  | ALIAS
| ) |  |

Value:
if (checkCPUKind(getCPUKind(ALIAS))) \
Values.emplace_back(ALIAS);
ALIAS
#define ALIAS(NAME, TOK, FLAGS)

## ◆ PROC_ALIAS [2/2]

#define PROC_ALIAS | ( |  | ENUM,
|  |  | ALIAS
| ) |  | .Case(ALIAS, CK_##ENUM)

## ◆ PROC_WITH_FEAT

#define PROC_WITH_FEAT | ( |  | ENUM,
|  |  | STR,
|  |  | IS64,
|  |  | KEY_FEAT
| ) |  |

Value:
case CK_##ENUM: \
return (getFeaturePriority(llvm::X86::KEY_FEAT) << 1) + 1;
getFeaturePriority
static unsigned getFeaturePriority(llvm::X86::ProcessorFeatures Feat)
Definition: X86.cpp:1462

## ◆ TARGET_BUILTIN [1/2]

#define TARGET_BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS,
|  |  | FEATURE
| ) |  | {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, FEATURE},

## ◆ TARGET_BUILTIN [2/2]

#define TARGET_BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS,
|  |  | FEATURE
| ) |  | {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, FEATURE},

## ◆ TARGET_HEADER_BUILTIN [1/2]

#define TARGET_HEADER_BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS,
|  |  | HEADER,
|  |  | LANGS,
|  |  | FEATURE
| ) |  | {#ID, TYPE, ATTRS, HEADER, LANGS, FEATURE},

## ◆ TARGET_HEADER_BUILTIN [2/2]

#define TARGET_HEADER_BUILTIN | ( |  | ID,
|  |  | TYPE,
|  |  | ATTRS,
|  |  | HEADER,
|  |  | LANGS,
|  |  | FEATURE
| ) |  | {#ID, TYPE, ATTRS, HEADER, LANGS, FEATURE},

## ◆ X86_CPU_SUBTYPE_COMPAT

#define X86_CPU_SUBTYPE_COMPAT | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, true)

## ◆ X86_CPU_TYPE_COMPAT

#define X86_CPU_TYPE_COMPAT | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, true)

## ◆ X86_CPU_TYPE_COMPAT_WITH_ALIAS

#define X86_CPU_TYPE_COMPAT_WITH_ALIAS | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR,
|  |  | ALIAS
| ) |  | .Cases(STR, ALIAS, true)

## ◆ X86_FEATURE_COMPAT [1/2]

#define X86_FEATURE_COMPAT | ( |  | VAL,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, true)

Referenced by clang::targets::X86TargetInfo::validateCpuSupports().

## ◆ X86_FEATURE_COMPAT [2/2]

#define X86_FEATURE_COMPAT | ( |  | VAL,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, llvm::X86::ENUM)

## ◆ X86_VENDOR

#define X86_VENDOR | ( |  | ENUM,
|  |  | STRING
| ) |  | .Case(STRING, true)

Referenced by clang::targets::X86TargetInfo::validateCpuIs().

## Function Documentation

## ◆ CPUSpecificCPUDispatchNameDealias()

static StringRef CPUSpecificCPUDispatchNameDealias | ( | StringRef | Name | ) |
| static

Definition at line 1506 of file X86.cpp.

## ◆ getFeature()

static llvm::X86::ProcessorFeatures getFeature | ( | StringRef | Name | ) |
| static

Definition at line 1453 of file X86.cpp.

## ◆ getFeaturePriority()

static unsigned getFeaturePriority | ( | llvm::X86::ProcessorFeatures | Feat | ) |
| static

Definition at line 1462 of file X86.cpp.