From: Craig Topper Date: Mon, 24 Sep 2018 18:55:41 +0000 (+0000) Subject: [X86] Infer 64bit feature support from the CPUID results in getHostCPUFeatures. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cdab204f098b952dec70cb34d90c482ded9fe13;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index d04f6e7..963b32b 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1217,6 +1217,8 @@ bool sys::getHostCPUFeatures(StringMap &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 &&