diff options
| author | Kai Nacke <kai.nacke@redstar.de> | 2013-12-20 09:24:13 +0000 |
|---|---|---|
| committer | Kai Nacke <kai.nacke@redstar.de> | 2013-12-20 09:24:13 +0000 |
| commit | b38bf9626ad00d2fca525af026c8884e98603ec8 (patch) | |
| tree | ba5d319a460259c9615f283a2128093dfb3838a8 | |
| parent | 0ba3f211c426dd6ab2ad3f30053b65fe956ae508 (diff) | |
| download | bcm5719-llvm-b38bf9626ad00d2fca525af026c8884e98603ec8.tar.gz bcm5719-llvm-b38bf9626ad00d2fca525af026c8884e98603ec8.zip | |
Add support for krait cpu in llvm::sys::getHostCPUName()
Recently, support for krait cpu was added. This commit extends getHostCPUName()
to return krait as cpu for the APQ8064 (a Krait 300).
llvm-svn: 197792
| -rw-r--r-- | llvm/lib/Support/Host.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index c5f9c872480..b6e2cb164d4 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -620,6 +620,17 @@ StringRef sys::getHostCPUName() { .Case("0xc24", "cortex-m4") .Default("generic"); + if (Implementer == "0x51") // Qualcomm Technologies, Inc. + // Look for the CPU part line. + for (unsigned I = 0, E = Lines.size(); I != E; ++I) + if (Lines[I].startswith("CPU part")) + // The CPU part is a 3 digit hexadecimal number with a 0x prefix. The + // values correspond to the "Part number" in the CP15/c0 register. The + // contents are specified in the various processor manuals. + return StringSwitch<const char *>(Lines[I].substr(8).ltrim("\t :")) + .Case("0x06f", "krait") // APQ8064 + .Default("generic"); + return "generic"; } #elif defined(__linux__) && defined(__s390x__) |

