diff options
author | Craig Topper <craig.topper@intel.com> | 2018-09-24 18:55:41 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-09-24 18:55:41 +0000 |
commit | 6cdab204f098b952dec70cb34d90c482ded9fe13 (patch) | |
tree | 7faf9d67de99a1844e7d29eaaa1df2947024274b /llvm/lib/Support/Host.cpp | |
parent | d32508a932ceafe070f66e8ce25f102a66f5a3e0 (diff) | |
download | bcm5719-llvm-6cdab204f098b952dec70cb34d90c482ded9fe13.tar.gz bcm5719-llvm-6cdab204f098b952dec70cb34d90c482ded9fe13.zip |
[X86] Infer 64bit feature support from the CPUID results in getHostCPUFeatures.
After r341022, we more strictly check the 64bit feature in X86Subtargets constructor when a 64-bit triple is used. If we don't infer this feature for autodetected CPUs we might incorrectly report an error if the CPU name wasn't autodetected to a CPU that supports 64-bit.
llvm-svn: 342914
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index d04f6e761ee..963b32b2c46 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1217,6 +1217,8 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { Features["tbm"] = HasExtLeaf1 && ((ECX >> 21) & 1); Features["mwaitx"] = HasExtLeaf1 && ((ECX >> 29) & 1); + Features["64bit"] = HasExtLeaf1 && ((EDX >> 29) & 1); + // Miscellaneous memory related features, detected by // using the 0x80000008 leaf of the CPUID instruction bool HasExtLeaf8 = MaxExtLevel >= 0x80000008 && |