[llvm] r373445 - [Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 04:04:55 PDT 2019
Author: mstorsjo
Date: Wed Oct 2 04:04:55 2019
New Revision: 373445
URL: http://llvm.org/viewvc/llvm-project?rev=373445&view=rev
Log:
[Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform
Patch by Adam Kallai!
Differential Revision: https://reviews.llvm.org/D68139
Modified:
llvm/trunk/lib/Support/Host.cpp
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=373445&r1=373444&r2=373445&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Wed Oct 2 04:04:55 2019
@@ -1512,6 +1512,17 @@ bool sys::getHostCPUFeatures(StringMap<b
return true;
}
+#elif defined(_WIN32) && (defined(__aarch64__) || defined(_M_ARM64))
+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
More information about the llvm-commits
mailing list