diff --git a/src/crypto/city.cpp b/src/crypto/city.cpp index af3a91b..cfd72e0 100644 --- a/src/crypto/city.cpp +++ b/src/crypto/city.cpp @@ -38,9 +38,10 @@ #include #if defined(__SSE4_2__) && defined(__x86_64__) -#include + #include + #define _mm_crc32_u64_impl _mm_crc32_u64 #else -uint64_t _mm_crc32_u64(uint64_t a, uint64_t b ); + uint64_t _mm_crc32_u64_impl(uint64_t a, uint64_t b ); #endif namespace fc { @@ -563,9 +564,9 @@ static void CityHashCrc256Long(const char *s, size_t len, g += e; \ e += z; \ g += x; \ - z = _mm_crc32_u64(z, b + g); \ - y = _mm_crc32_u64(y, e + h); \ - x = _mm_crc32_u64(x, f + a); \ + z = _mm_crc32_u64_impl(z, b + g); \ + y = _mm_crc32_u64_impl(y, e + h); \ + x = _mm_crc32_u64_impl(x, f + a); \ e = Rotate(e, r); \ c += e; \ s += 40 diff --git a/src/crypto/crc.cpp b/src/crypto/crc.cpp index 7fa8cb1..28e99c9 100644 --- a/src/crypto/crc.cpp +++ b/src/crypto/crc.cpp @@ -604,7 +604,7 @@ static const uint32_t crc_c[256] = { #if !defined __SSE4_2__ || (defined __SSE4_2__ && !defined __x86_64__) -uint64_t _mm_crc32_u64(uint64_t a, uint64_t b ) +uint64_t _mm_crc32_u64_impl(uint64_t a, uint64_t b ) { // Squelch warning about unusued variable crc_c (void)(crc_c); @@ -619,7 +619,7 @@ int main( int argc, char** argv ) { uint64_t f = 0x1234; uint64_t a = 0x5678; - uint32_t f1 = _mm_crc32_u64(f, a); + uint32_t f1 = _mm_crc32_u64_impl(f, a); uint32_t f4 = crc32cSlicingBy8(f, (unsigned char*)&a, sizeof(a)); std::cout<