forked from OSchip/llvm-project
BMI2 support is indicated in bit eight of EBX, not nine.
See Intel SDM, Vol 2A, Table 3-8: https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#page=296 Differential Revision: https://reviews.llvm.org/D65766 llvm-svn: 367929
This commit is contained in:
parent
23f073100d
commit
1d73e228db
|
@ -543,7 +543,7 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
|
|||
setFeature(FEATURE_BMI);
|
||||
if (HasLeaf7 && ((EBX >> 5) & 1) && HasAVX)
|
||||
setFeature(FEATURE_AVX2);
|
||||
if (HasLeaf7 && ((EBX >> 9) & 1))
|
||||
if (HasLeaf7 && ((EBX >> 8) & 1))
|
||||
setFeature(FEATURE_BMI2);
|
||||
if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save)
|
||||
setFeature(FEATURE_AVX512F);
|
||||
|
|
|
@ -1034,7 +1034,7 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
|
|||
setFeature(X86::FEATURE_BMI);
|
||||
if (HasLeaf7 && ((EBX >> 5) & 1) && HasAVX)
|
||||
setFeature(X86::FEATURE_AVX2);
|
||||
if (HasLeaf7 && ((EBX >> 9) & 1))
|
||||
if (HasLeaf7 && ((EBX >> 8) & 1))
|
||||
setFeature(X86::FEATURE_BMI2);
|
||||
if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save)
|
||||
setFeature(X86::FEATURE_AVX512F);
|
||||
|
|
Loading…
Reference in New Issue