diff options
author | Gabor Buella <gabor.buella@intel.com> | 2018-05-25 06:32:05 +0000 |
---|---|---|
committer | Gabor Buella <gabor.buella@intel.com> | 2018-05-25 06:32:05 +0000 |
commit | d2f1ab1b1001d0ddf9ab227e1666ec9477e47eb9 (patch) | |
tree | 5868d9c0d1c932a357627d340020f44db58d5c40 /llvm/lib/Support/Host.cpp | |
parent | 79fffe351561eaa837a81abe5a55284ae9b4472f (diff) | |
download | bcm5719-llvm-d2f1ab1b1001d0ddf9ab227e1666ec9477e47eb9.tar.gz bcm5719-llvm-d2f1ab1b1001d0ddf9ab227e1666ec9477e47eb9.zip |
[x86] invpcid LLVM intrinsic
Re-add the feature flag for invpcid, which was removed in r294561.
Add an intrinsic, which always uses a 32 bit integer as first argument,
while the instruction actually uses a 64 bit register in 64 bit mode
for the INVPCID_TYPE argument.
Reviewers: craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D47141
llvm-svn: 333255
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 775db63d7de..2c718dd3f5a 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1231,6 +1231,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { // AVX2 is only supported if we have the OS save support from AVX. Features["avx2"] = HasLeaf7 && ((EBX >> 5) & 1) && HasAVXSave; Features["bmi2"] = HasLeaf7 && ((EBX >> 8) & 1); + Features["invpcid"] = HasLeaf7 && ((EBX >> 10) & 1); Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; |