1diff --git a/base/third_party/cityhash_v103/src/city_v103.cc b/base/third_party/cityhash_v103/src/city_v103.cc 2index f1301ce49b67..0de3e16a4c0c 100644 3--- a/base/third_party/cityhash_v103/src/city_v103.cc 4+++ b/base/third_party/cityhash_v103/src/city_v103.cc 5@@ -351,117 +351,3 @@ uint128 CityHash128(const char *s, size_t len) { 6 return CityHash128WithSeed(s, len, uint128(k0, k1)); 7 } 8 } 9- 10-#ifdef __SSE4_2__ 11-#include <citycrc.h> 12-#include <nmmintrin.h> 13- 14-// Requires len >= 240. 15-static void CityHashCrc256Long(const char *s, size_t len, 16- uint32 seed, uint64 *result) { 17- uint64 a = Fetch64(s + 56) + k0; 18- uint64 b = Fetch64(s + 96) + k0; 19- uint64 c = result[0] = HashLen16(b, len); 20- uint64 d = result[1] = Fetch64(s + 120) * k0 + len; 21- uint64 e = Fetch64(s + 184) + seed; 22- uint64 f = seed; 23- uint64 g = 0; 24- uint64 h = 0; 25- uint64 i = 0; 26- uint64 j = 0; 27- uint64 t = c + d; 28- 29- // 240 bytes of input per iter. 30- size_t iters = len / 240; 31- len -= iters * 240; 32- do { 33-#define CHUNK(multiplier, z) \ 34- { \ 35- uint64 old_a = a; \ 36- a = Rotate(b, 41 ^ z) * multiplier + Fetch64(s); \ 37- b = Rotate(c, 27 ^ z) * multiplier + Fetch64(s + 8); \ 38- c = Rotate(d, 41 ^ z) * multiplier + Fetch64(s + 16); \ 39- d = Rotate(e, 33 ^ z) * multiplier + Fetch64(s + 24); \ 40- e = Rotate(t, 25 ^ z) * multiplier + Fetch64(s + 32); \ 41- t = old_a; \ 42- } \ 43- f = _mm_crc32_u64(f, a); \ 44- g = _mm_crc32_u64(g, b); \ 45- h = _mm_crc32_u64(h, c); \ 46- i = _mm_crc32_u64(i, d); \ 47- j = _mm_crc32_u64(j, e); \ 48- s += 40 49- 50- CHUNK(1, 1); CHUNK(k0, 0); 51- CHUNK(1, 1); CHUNK(k0, 0); 52- CHUNK(1, 1); CHUNK(k0, 0); 53- } while (--iters > 0); 54- 55- while (len >= 40) { 56- CHUNK(k0, 0); 57- len -= 40; 58- } 59- if (len > 0) { 60- s = s + len - 40; 61- CHUNK(k0, 0); 62- } 63- j += i << 32; 64- a = HashLen16(a, j); 65- h += g << 32; 66- b += h; 67- c = HashLen16(c, f) + i; 68- d = HashLen16(d, e + result[0]); 69- j += e; 70- i += HashLen16(h, t); 71- e = HashLen16(a, d) + j; 72- f = HashLen16(b, c) + a; 73- g = HashLen16(j, i) + c; 74- result[0] = e + f + g + h; 75- a = ShiftMix((a + g) * k0) * k0 + b; 76- result[1] += a + result[0]; 77- a = ShiftMix(a * k0) * k0 + c; 78- result[2] = a + result[1]; 79- a = ShiftMix((a + e) * k0) * k0; 80- result[3] = a + result[2]; 81-} 82- 83-// Requires len < 240. 84-static void CityHashCrc256Short(const char *s, size_t len, uint64 *result) { 85- char buf[240]; 86- memcpy(buf, s, len); 87- memset(buf + len, 0, 240 - len); 88- CityHashCrc256Long(buf, 240, ~static_cast<uint32>(len), result); 89-} 90- 91-void CityHashCrc256(const char *s, size_t len, uint64 *result) { 92- if (LIKELY(len >= 240)) { 93- CityHashCrc256Long(s, len, 0, result); 94- } else { 95- CityHashCrc256Short(s, len, result); 96- } 97-} 98- 99-uint128 CityHashCrc128WithSeed(const char *s, size_t len, uint128 seed) { 100- if (len <= 900) { 101- return CityHash128WithSeed(s, len, seed); 102- } else { 103- uint64 result[4]; 104- CityHashCrc256(s, len, result); 105- uint64 u = Uint128High64(seed) + result[0]; 106- uint64 v = Uint128Low64(seed) + result[1]; 107- return uint128(HashLen16(u, v + result[2]), 108- HashLen16(Rotate(v, 32), u * k0 + result[3])); 109- } 110-} 111- 112-uint128 CityHashCrc128(const char *s, size_t len) { 113- if (len <= 900) { 114- return CityHash128(s, len); 115- } else { 116- uint64 result[4]; 117- CityHashCrc256(s, len, result); 118- return uint128(result[2], result[3]); 119- } 120-} 121- 122-#endif 123