Use FOLLY_DEPRECATED rather than directly using GCC specific attributes.
[folly.git] / folly / Checksum.cpp
index a7afa352b8a789eac91c23725b9983032f89c67e..d8daf66fcd11bd55efebb48403a2b7cba047d9ab 100644 (file)
@@ -29,10 +29,11 @@ namespace detail {
   #define __has_builtin(x) 0
 #endif
 
-#if (__has_builtin(__builtin_ia32_crc32qi) && \
+#if __SSE4_2__ && \
+    ((__has_builtin(__builtin_ia32_crc32qi) && \
      __has_builtin(__builtin_ia32_crc32di)) || \
     (FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
-     (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407))
+     (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407)))
 
 // Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
 uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,