[llvm-commits] [llvm] r156486 - /llvm/trunk/lib/Support/Host.cpp
Bob Wilson
bob.wilson at apple.com
Wed May 9 10:47:03 PDT 2012
Author: bwilson
Date: Wed May 9 12:47:03 2012
New Revision: 156486
URL: http://llvm.org/viewvc/llvm-project?rev=156486&view=rev
Log:
Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.
For the Family 6 switch in sys::getHostCPUName, an unrecognized model was
reported as "i686". That's a really bad default since it means that new
CPUs will be treated as if they can only use 32-bit code. This just looks
at the cpuid extended feature flag for 64 bit support, and if that is set,
it uses a default x86-64 cpu. Similar logic is already used for the Family
15 code. <rdar://problem/11314502>
Modified:
llvm/trunk/lib/Support/Host.cpp
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=156486&r1=156485&r2=156486&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Wed May 9 12:47:03 2012
@@ -239,7 +239,7 @@
case 39: // 32 nm Atom Medfield
return "atom";
- default: return "i686";
+ default: return (Em64T) ? "x86-64" : "i686";
}
case 15: {
switch (Model) {
More information about the llvm-commits
mailing list