summaryrefslogtreecommitdiff
path: root/absl/crc/internal/crc_memcpy_fallback.cc
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-01-05 16:42:37 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-05 23:06:37 -0800
commit625a18016d6208c6c0419697cb6caa3f23ce31bc (patch)
tree85e21b7012000963c946ea8c9d58d982aed20667 /absl/crc/internal/crc_memcpy_fallback.cc
parent05109783621601b680cf33217edde6a8e484327b (diff)
Require 64-bit builds on x86 to use AcceleratedCrcMemcpyEngine
This also ensures that there is only one definition of GetArchSpecificEngines by moving the condition to a common place. PiperOrigin-RevId: 500038304 Change-Id: If0c55d701dfdc11a1a9c8c1b34eb220435529ffb
Diffstat (limited to 'absl/crc/internal/crc_memcpy_fallback.cc')
-rw-r--r--absl/crc/internal/crc_memcpy_fallback.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/crc/internal/crc_memcpy_fallback.cc b/absl/crc/internal/crc_memcpy_fallback.cc
index 4579c164..15b4b055 100644
--- a/absl/crc/internal/crc_memcpy_fallback.cc
+++ b/absl/crc/internal/crc_memcpy_fallback.cc
@@ -54,7 +54,7 @@ absl::crc32c_t FallbackCrcMemcpyEngine::Compute(void* __restrict dst,
}
// Compile the following only if we don't have
-#ifndef __SSE4_2__
+#ifndef ABSL_INTERNAL_HAVE_X86_64_ACCELERATED_CRC_MEMCPY_ENGINE
CrcMemcpy::ArchSpecificEngines CrcMemcpy::GetArchSpecificEngines() {
CrcMemcpy::ArchSpecificEngines engines;
@@ -68,7 +68,7 @@ std::unique_ptr<CrcMemcpyEngine> CrcMemcpy::GetTestEngine(int /*vector*/,
return std::make_unique<FallbackCrcMemcpyEngine>();
}
-#endif
+#endif // ABSL_INTERNAL_HAVE_X86_64_ACCELERATED_CRC_MEMCPY_ENGINE
} // namespace crc_internal
ABSL_NAMESPACE_END