diff options
author | Bryan Chan <bryan.chan@huawei.com> | 2018-11-09 19:32:08 +0000 |
---|---|---|
committer | Bryan Chan <bryan.chan@huawei.com> | 2018-11-09 19:32:08 +0000 |
commit | 123553921f86ac0fad7b742740aa45e8d380be02 (patch) | |
tree | a727a74cf795dd41479bccaa6f20f5c8268b6373 /llvm/lib/Support/Host.cpp | |
parent | 91bdf24cfdcba93fda1872c8c68186cf4118a442 (diff) | |
download | bcm5719-llvm-123553921f86ac0fad7b742740aa45e8d380be02.tar.gz bcm5719-llvm-123553921f86ac0fad7b742740aa45e8d380be02.zip |
[AArch64] Support HiSilicon's TSV110 processor
Reviewers: t.p.northover, SjoerdMeijer, kristof.beyls
Reviewed By: kristof.beyls
Subscribers: olista01, javed.absar, kristof.beyls, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D53908
llvm-svn: 346546
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-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 91e98a33b37..c616dbecdb3 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -211,6 +211,17 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { } } + if (Implementer == "0x48") // HiSilicon 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("0xd01", "tsv110") + .Default("generic"); + if (Implementer == "0x51") // Qualcomm Technologies, Inc. // Look for the CPU part line. for (unsigned I = 0, E = Lines.size(); I != E; ++I) |