summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-05-09 17:47:03 +0000
committerBob Wilson <bob.wilson@apple.com>2012-05-09 17:47:03 +0000
commit8d4e2fab63e715c3e93c8321b32e00ccd74ed85c (patch)
tree5366e6360691b735ab2f6737904e1053703d8e0d /llvm/lib/Support/Host.cpp
parentdd83f5e779607266c94c5706015ab253acd40a5c (diff)
downloadbcm5719-llvm-8d4e2fab63e715c3e93c8321b32e00ccd74ed85c.tar.gz
bcm5719-llvm-8d4e2fab63e715c3e93c8321b32e00ccd74ed85c.zip
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
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r--llvm/lib/Support/Host.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index 6d42780cc28..1ad7852dd93 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/llvm/lib/Support/Host.cpp
@@ -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) {
OpenPOWER on IntegriCloud