Add AVX-512 and related features to the CPUID detection code.

llvm-svn: 188745
This commit is contained in:
Craig Topper 2013-08-20 05:22:42 +00:00
parent fd2b389263
commit e13a066c94
1 changed files with 19 additions and 3 deletions

View File

@ -351,14 +351,30 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
HasRTM = true;
ToggleFeature(X86::FeatureRTM);
}
if (IsIntel && ((EBX >> 19) & 0x1)) {
HasADX = true;
ToggleFeature(X86::FeatureADX);
if (IsIntel && ((EBX >> 16) & 0x1)) {
X86SSELevel = AVX512;
ToggleFeature(X86::FeatureAVX512);
}
if (IsIntel && ((EBX >> 18) & 0x1)) {
HasRDSEED = true;
ToggleFeature(X86::FeatureRDSEED);
}
if (IsIntel && ((EBX >> 19) & 0x1)) {
HasADX = true;
ToggleFeature(X86::FeatureADX);
}
if (IsIntel && ((EBX >> 26) & 0x1)) {
HasPFI = true;
ToggleFeature(X86::FeaturePFI);
}
if (IsIntel && ((EBX >> 27) & 0x1)) {
HasERI = true;
ToggleFeature(X86::FeatureERI);
}
if (IsIntel && ((EBX >> 28) & 0x1)) {
HasCDI = true;
ToggleFeature(X86::FeatureCDI);
}
}
}
}