Add X86 BZHI instruction as well as BMI2 feature detection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2011-10-16 07:55:05 +00:00
parent dc479c4a89
commit b53fa8bf19
12 changed files with 101 additions and 65 deletions

View File

@@ -283,6 +283,10 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
HasBMI = true;
ToggleFeature(X86::FeatureBMI);
}
if ((EBX >> 8) & 0x1) {
HasBMI2 = true;
ToggleFeature(X86::FeatureBMI2);
}
}
}
@@ -307,6 +311,7 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
, HasF16C(false)
, HasLZCNT(false)
, HasBMI(false)
, HasBMI2(false)
, IsBTMemSlow(false)
, IsUAMemFast(false)
, HasVectorUAMem(false)