gate sse42 implementation of checksum for x86 only
[folly.git] / folly / detail / ChecksumDetail.cpp
index 4d1a9c0231642f0e18d239d58cea05d941581c81..7a1f592331c8a41aa533a175d96e0b5d80abf2e8 100644 (file)
 namespace folly {
 namespace detail {
 
+#if FOLLY_SSE_PREREQ(4, 2)
+
 uint32_t
 crc32_hw_aligned(uint32_t remainder, const __m128i* p, size_t vec_count) {
   /* Constants precomputed by gen_crc32_multipliers.c.  Do not edit! */
@@ -269,5 +271,7 @@ _128_bits_at_a_time:
   x0 = _mm_clmulepi64_si128(_mm_and_si128(x0, mask32), barrett_reduction_constants, 0x10);
   return _mm_cvtsi128_si32(_mm_srli_si128(_mm_xor_si128(x0, x1), 4));
 }
+
+#endif
 }
 } // namespace