diff options
author | Gabor Buella <gabor.buella@intel.com> | 2018-04-11 20:01:57 +0000 |
---|---|---|
committer | Gabor Buella <gabor.buella@intel.com> | 2018-04-11 20:01:57 +0000 |
commit | 2ef36f3571c83650f3e1bac42c810c289851d865 (patch) | |
tree | e77e989c86f9fab5b36c9e79361418ad00cb089b /llvm/lib/Support/Host.cpp | |
parent | d11b6edfc8d870a53995a195c801f5c305e19b1a (diff) | |
download | bcm5719-llvm-2ef36f3571c83650f3e1bac42c810c289851d865.tar.gz bcm5719-llvm-2ef36f3571c83650f3e1bac42c810c289851d865.zip |
[X86] Describe wbnoinvd instruction
Similar to the wbinvd instruction, except this
one does not invalidate caches. Ring 0 only.
The encoding matches a wbinvd instruction with
an F3 prefix.
Reviewers: craig.topper, zvi, ashlykov
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D43816
llvm-svn: 329847
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 656e2577608..304a9e3736a 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1213,9 +1213,12 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { Features["tbm"] = HasExtLeaf1 && ((ECX >> 21) & 1); Features["mwaitx"] = HasExtLeaf1 && ((ECX >> 29) & 1); + // Miscellaneous memory related features, detected by + // using the 0x80000008 leaf of the CPUID instruction bool HasExtLeaf8 = MaxExtLevel >= 0x80000008 && !getX86CpuIDAndInfo(0x80000008, &EAX, &EBX, &ECX, &EDX); - Features["clzero"] = HasExtLeaf8 && ((EBX >> 0) & 1); + Features["clzero"] = HasExtLeaf8 && ((EBX >> 0) & 1); + Features["wbnoinvd"] = HasExtLeaf8 && ((EBX >> 9) & 1); bool HasLeaf7 = MaxLevel >= 7 && !getX86CpuIDAndInfoEx(0x7, 0x0, &EAX, &EBX, &ECX, &EDX); |