diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-08-11 16:07:28 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-08-11 16:07:36 +0100 |
commit | 08a880509e4f7ca8d346dce42fe7528c3a33f22c (patch) | |
tree | b3a6096143407143872b473d36c4f549a51451b2 /llvm/lib/Support/Host.cpp | |
parent | b92161f927ccf941f7da01f8e0f856ceb51f1abf (diff) | |
download | llvm-08a880509e4f7ca8d346dce42fe7528c3a33f22c.zip llvm-08a880509e4f7ca8d346dce42fe7528c3a33f22c.tar.gz llvm-08a880509e4f7ca8d346dce42fe7528c3a33f22c.tar.bz2 |
[X86] Add RDPRU instruction CPUID bit masks
As mentioned on D128934 - we weren't including the CPUID bit handling for the RDPRU instruction
AMD's APMv3 (24594) lists it as CPUID Fn8000_0008_EBX Bit#4
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 40d8592..f67acd7 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1734,6 +1734,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { bool HasExtLeaf8 = MaxExtLevel >= 0x80000008 && !getX86CpuIDAndInfo(0x80000008, &EAX, &EBX, &ECX, &EDX); Features["clzero"] = HasExtLeaf8 && ((EBX >> 0) & 1); + Features["rdpru"] = HasExtLeaf8 && ((EBX >> 4) & 1); Features["wbnoinvd"] = HasExtLeaf8 && ((EBX >> 9) & 1); bool HasLeaf7 = |