f8058910 |
};
// Sorted (by key) array of values for CPU features.
static const llvm::SubtargetFeatureKV FeatureKV[] = {
{ "3dnow", "Enable 3DNow! instructions", Feature3DNow, 0 },
{ "3dnowa", "Enable 3DNow! Athlon instructions", Feature3DNowA, Feature3DNow },
{ "64bit", "Support 64-bit instructions", Feature64Bit, 0 },
{ "avx", "Enable AVX instructions", FeatureAVX, 0 },
{ "cmov", "Enable conditional move instructions", FeatureCMOV, 0 },
{ "fma3", "Enable three-operand fused multiple-add", FeatureFMA3, 0 },
{ "fma4", "Enable four-operand fused multiple-add", FeatureFMA4, 0 },
{ "mmx", "Enable MMX instructions", FeatureMMX, 0 },
{ "slow-bt-mem", "Bit testing of memory is slow", FeatureSlowBTMem, 0 },
{ "sse", "Enable SSE instructions", FeatureSSE1, FeatureMMX | FeatureCMOV },
{ "sse2", "Enable SSE2 instructions", FeatureSSE2, FeatureSSE1 },
{ "sse3", "Enable SSE3 instructions", FeatureSSE3, FeatureSSE2 },
{ "sse41", "Enable SSE 4.1 instructions", FeatureSSE41, FeatureSSSE3 },
{ "sse42", "Enable SSE 4.2 instructions", FeatureSSE42, FeatureSSE41 },
{ "sse4a", "Support SSE 4a instructions", FeatureSSE4A, 0 }, |
f8058910 |
};
enum {
FeatureKVSize = sizeof(FeatureKV)/sizeof(llvm::SubtargetFeatureKV)
};
// Sorted (by key) array of values for CPU subtype.
static const llvm::SubtargetFeatureKV SubTypeKV[] = {
{ "amdfam10", "Select the amdfam10 processor", FeatureSSE3 | FeatureSSE4A | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "athlon", "Select the athlon processor", FeatureMMX | Feature3DNowA | FeatureSlowBTMem, 0 },
{ "athlon-4", "Select the athlon-4 processor", FeatureSSE1 | Feature3DNowA | FeatureSlowBTMem, 0 },
{ "athlon-fx", "Select the athlon-fx processor", FeatureSSE2 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "athlon-mp", "Select the athlon-mp processor", FeatureSSE1 | Feature3DNowA | FeatureSlowBTMem, 0 },
{ "athlon-tbird", "Select the athlon-tbird processor", FeatureMMX | Feature3DNowA | FeatureSlowBTMem, 0 },
{ "athlon-xp", "Select the athlon-xp processor", FeatureSSE1 | Feature3DNowA | FeatureSlowBTMem, 0 },
{ "athlon64", "Select the athlon64 processor", FeatureSSE2 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "athlon64-sse3", "Select the athlon64-sse3 processor", FeatureSSE3 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "atom", "Select the atom processor", FeatureSSE3 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "barcelona", "Select the barcelona processor", FeatureSSE3 | FeatureSSE4A | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "c3", "Select the c3 processor", FeatureMMX | Feature3DNow, 0 },
{ "c3-2", "Select the c3-2 processor", FeatureSSE1, 0 },
{ "core2", "Select the core2 processor", FeatureSSSE3 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "corei7", "Select the corei7 processor", FeatureSSE42 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "generic", "Select the generic processor", 0, 0 },
{ "i386", "Select the i386 processor", 0, 0 },
{ "i486", "Select the i486 processor", 0, 0 },
{ "i586", "Select the i586 processor", 0, 0 },
{ "i686", "Select the i686 processor", 0, 0 },
{ "istanbul", "Select the istanbul processor", Feature3DNowA | Feature64Bit | FeatureSSE4A | Feature3DNowA, 0 },
{ "k6", "Select the k6 processor", FeatureMMX, 0 },
{ "k6-2", "Select the k6-2 processor", FeatureMMX | Feature3DNow, 0 },
{ "k6-3", "Select the k6-3 processor", FeatureMMX | Feature3DNow, 0 },
{ "k8", "Select the k8 processor", FeatureSSE2 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "k8-sse3", "Select the k8-sse3 processor", FeatureSSE3 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "nehalem", "Select the nehalem processor", FeatureSSE42 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "nocona", "Select the nocona processor", FeatureSSE3 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "opteron", "Select the opteron processor", FeatureSSE2 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "opteron-sse3", "Select the opteron-sse3 processor", FeatureSSE3 | Feature3DNowA | Feature64Bit | FeatureSlowBTMem, 0 },
{ "penryn", "Select the penryn processor", FeatureSSE41 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "pentium", "Select the pentium processor", 0, 0 },
{ "pentium-m", "Select the pentium-m processor", FeatureSSE2 | FeatureSlowBTMem, 0 },
{ "pentium-mmx", "Select the pentium-mmx processor", FeatureMMX, 0 },
{ "pentium2", "Select the pentium2 processor", FeatureMMX | FeatureCMOV, 0 },
{ "pentium3", "Select the pentium3 processor", FeatureSSE1, 0 },
{ "pentium4", "Select the pentium4 processor", FeatureSSE2, 0 },
{ "pentiumpro", "Select the pentiumpro processor", FeatureCMOV, 0 },
{ "prescott", "Select the prescott processor", FeatureSSE3 | FeatureSlowBTMem, 0 },
{ "sandybridge", "Select the sandybridge processor", FeatureSSE42 | FeatureAVX | Feature64Bit, 0 },
{ "shanghai", "Select the shanghai processor", Feature3DNowA | Feature64Bit | FeatureSSE4A | Feature3DNowA, 0 },
{ "winchip-c6", "Select the winchip-c6 processor", FeatureMMX, 0 },
{ "winchip2", "Select the winchip2 processor", FeatureMMX | Feature3DNow, 0 },
{ "x86-64", "Select the x86-64 processor", FeatureSSE2 | Feature64Bit | FeatureSlowBTMem, 0 },
{ "yonah", "Select the yonah processor", FeatureSSE3 | FeatureSlowBTMem, 0 }
};
enum {
SubTypeKVSize = sizeof(SubTypeKV)/sizeof(llvm::SubtargetFeatureKV)
};
enum {
ItinClassesSize = 1
};
// ParseSubtargetFeatures - Parses features string setting specified
// subtarget options.
std::string llvm::X86Subtarget::ParseSubtargetFeatures(const std::string &FS,
const std::string &CPU) { |