diff options
author | Imran Hameed <imhameed@microsoft.com> | 2021-03-22 18:07:16 +0300 |
---|---|---|
committer | Imran Hameed <imhameed@microsoft.com> | 2021-06-03 00:03:15 +0300 |
commit | 5282270f6e19bbdd0255c4dda424afc8cbf9f492 (patch) | |
tree | c2ded5b7e2ea4c3f34c775c4c6943b71fecc2dc2 | |
parent | 8f0a40c8dc57ae996d9d391d9eaf34e7d53e5583 (diff) |
RDM and DP detection on arm64 Linux
There's no guarantee that `ID_AA64ISAR0_EL1` can be read from user-mode,
so add to the existing `/proc/cpuinfo` parser instead.
See also:
- https://www.kernel.org/doc/html/latest/arm64/elf_hwcaps.html
- https://developer.arm.com/documentation/100403/0200/register-descriptions/aarch64-system-registers/id-aa64isar0-el1--aarch64-instruction-set-attribute-register-0--el1
- https://elixir.bootlin.com/linux/v5.11.7/source/arch/arm64/kernel/cpuinfo.c#L58
- https://elixir.bootlin.com/linux/v5.11.7/source/arch/arm64/kernel/cpuinfo.c#L66
-rw-r--r-- | llvm/lib/Support/Host.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 36cecf9b2a16..d647d49a9ec1 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1490,6 +1490,8 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) { StringRef LLVMFeatureStr = StringSwitch<StringRef>(CPUFeatures[I]) #if defined(__aarch64__) .Case("asimd", "neon") + .Case("asimddp", "dotprod") + .Case("asimdrdm", "rdm") .Case("fp", "fp-armv8") .Case("crc32", "crc") #else |