diff options
author | Eric Christopher <echristo@gmail.com> | 2019-08-05 21:25:59 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2019-08-05 21:25:59 +0000 |
commit | 1d73e228db39f9755bc601bc863b5701f22a9d6b (patch) | |
tree | f01c5f45054fd49ee0e1cbe0a972fafb353d1ab1 /llvm/lib/Support/Host.cpp | |
parent | 23f073100d5c882abcebb0edcbcdba78bdcbb14c (diff) | |
download | bcm5719-llvm-1d73e228db39f9755bc601bc863b5701f22a9d6b.tar.gz bcm5719-llvm-1d73e228db39f9755bc601bc863b5701f22a9d6b.zip |
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
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index d491912bdc0..3ad1495957b 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -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); |