[PATCH] D68139: [Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform
Ádám Kallai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 06:59:10 PDT 2019
kaadam created this revision.
kaadam added a reviewer: Bigcheese.
Herald added subscribers: llvm-commits, dexonsmith, kristof.beyls.
Herald added a project: LLVM.
This change implements getHostCPUFeatures function to enable this functionality on Windows on ARM64. Unittest isn't included for this patch, since I'm not able to see how to reasonably write one, and I couldn't find any existing testcases related to it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68139
Files:
lib/Support/Host.cpp
Index: lib/Support/Host.cpp
===================================================================
--- lib/Support/Host.cpp
+++ lib/Support/Host.cpp
@@ -1512,6 +1512,17 @@
return true;
}
+#elif defined(_WIN32) && defined(__aarch64__)
+bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
+ if (IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE))
+ Features["neon"] = true;
+ if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE))
+ Features["crc"] = true;
+ if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
+ Features["crypto"] = true;
+
+ return true;
+}
#else
bool sys::getHostCPUFeatures(StringMap<bool> &Features) { return false; }
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68139.222159.patch
Type: text/x-patch
Size: 717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190927/846d3efe/attachment.bin>
More information about the llvm-commits
mailing list