summaryrefslogtreecommitdiff
path: root/util/crc32c.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/crc32c.cc')
-rw-r--r--util/crc32c.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/crc32c.cc b/util/crc32c.cc
index a709e9b1c..959658099 100644
--- a/util/crc32c.cc
+++ b/util/crc32c.cc
@@ -41,6 +41,10 @@
#endif
+#if defined(__linux__) && defined(HAVE_ARM64_CRC)
+bool pmull_runtime_flag = false;
+#endif
+
namespace ROCKSDB_NAMESPACE {
namespace crc32c {
@@ -494,6 +498,7 @@ std::string IsFastCrc32Supported() {
if (crc32c_runtime_check()) {
has_fast_crc = true;
arch = "Arm64";
+ pmull_runtime_flag = crc32c_pmull_runtime_check();
} else {
has_fast_crc = false;
arch = "Arm64";
@@ -1224,6 +1229,7 @@ static inline Function Choose_Extend() {
return isAltiVec() ? ExtendPPCImpl : ExtendImpl<Slow_CRC32>;
#elif defined(__linux__) && defined(HAVE_ARM64_CRC)
if(crc32c_runtime_check()) {
+ pmull_runtime_flag = crc32c_pmull_runtime_check();
return ExtendARMImpl;
} else {
return ExtendImpl<Slow_CRC32>;