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>

llvm-svn: 156486
This commit is contained in:
Bob Wilson 2012-05-09 17:47:03 +00:00
parent ec576d9105
commit 2c54f42ad2

View File

@ -239,7 +239,7 @@ std::string sys::getHostCPUName() {
case 39: // 32 nm Atom Medfield
return "atom";
default: return "i686";
default: return (Em64T) ? "x86-64" : "i686";
}
case 15: {
switch (Model) {