| 1 | Upstream-status: <https://github.com/nodejs/node/issues/64021>
|
| 2 |
|
| 3 | diff --git a/deps/v8/src/strings/string-hasher.cc b/deps/v8/src/strings/string-hasher.cc
|
| 4 | index bea067c6f0..42dc676228 100644
|
| 5 | |
| 6 | |
| 7 | @@ -24,7 +24,7 @@ struct ConvertTo8BitHashReader {
|
| 8 | DCHECK_LE(p[5], 0xff);
|
| 9 | DCHECK_LE(p[6], 0xff);
|
| 10 | DCHECK_LE(p[7], 0xff);
|
| 11 | -#ifdef __SSE2__
|
| 12 | +#if defined(__SSE2__) && defined(V8_TARGET_ARCH_64_BIT)
|
| 13 | __m128i x = _mm_loadu_si128(reinterpret_cast<const __m128i*>(p));
|
| 14 | return _mm_cvtsi128_si64(_mm_packus_epi16(x, x));
|
| 15 | #elif defined(__ARM_NEON__)
|
| 16 | @@ -45,7 +45,7 @@ struct ConvertTo8BitHashReader {
|
| 17 | DCHECK_LE(p[1], 0xff);
|
| 18 | DCHECK_LE(p[2], 0xff);
|
| 19 | DCHECK_LE(p[3], 0xff);
|
| 20 | -#ifdef __SSE2__
|
| 21 | +#if defined(__SSE2__) && defined(V8_TARGET_ARCH_64_BIT)
|
| 22 | __m128i x = _mm_loadu_si64(reinterpret_cast<const __m128i*>(p));
|
| 23 | return _mm_cvtsi128_si64(_mm_packus_epi16(x, x));
|
| 24 | #elif defined(__ARM_NEON__)
|