From 55b37efa158560fc724dbb4ca1cbca61e6a0a491 Mon Sep 17 00:00:00 2001 From: Warren Falk Date: Thu, 10 Dec 2015 20:26:11 -0500 Subject: [PATCH] fix a compile error on 32-bit --- util/crc32c.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/crc32c.cc b/util/crc32c.cc index b8d281a27..315263363 100644 --- a/util/crc32c.cc +++ b/util/crc32c.cc @@ -315,8 +315,15 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) { static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) { #ifdef __SSE4_2__ +#ifdef __LP64__ *l = _mm_crc32_u64(*l, LE_LOAD64(*p)); *p += 8; +#else + *l = _mm_crc32_u32(*l, LE_LOAD32(*p)); + *p += 4; + *l = _mm_crc32_u32(*l, LE_LOAD32(*p)); + *p += 4; +#endif #else Slow_CRC32(l, p); #endif