cityhash: disable SSE 4.2 optimization on x86

$ c++ -m32 -msse4.2 -c ext/native/ext/cityhash/city.cpp
ext/native/ext/cityhash/city.cpp:569:5: error: use of undeclared identifier '_mm_crc32_u64'
    CHUNK(0); PERMUTE3(a, h, c);
    ^
ext/native/ext/cityhash/city.cpp:562:9: note: expanded from macro 'CHUNK'
    z = _mm_crc32_u64(z, b + g);                \
        ^
This commit is contained in:
Jan Beich committed 2018-05-30 19:53:26 +00:00
1 parent 00e5da2c35
commit c783e7761c
1 file changed
+1 -4
+1 -4
View File
@@ -27,9 +27,6 @@
// possible hash functions, by using SIMD instructions, or by
// compromising on hash quality.
#ifdef __ANDROID__
#undef __SSE4_2__
#endif
#include "city.h"
#include <algorithm>
@@ -521,7 +518,7 @@ uint128 CityHash128(const char *s, size_t len) {
CityHash128WithSeed(s, len, uint128(k0, k1));
}
#ifdef __SSE4_2__
#if defined(__x86_64__) && defined(__SSE4_2__)
#include "citycrc.h"
#include <nmmintrin.h>