diff --git a/common.gypi b/common.gypi index 5aef7768323c..e59a7ef95da4 100644 --- a/common.gypi +++ b/common.gypi @@ -42,7 +42,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.29', + 'v8_embedder_string': '-node.30', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/third_party/rapidhash-v8/README.chromium b/deps/v8/third_party/rapidhash-v8/README.chromium index da20cd8d2563..10d67d80c3ee 100644 --- a/deps/v8/third_party/rapidhash-v8/README.chromium +++ b/deps/v8/third_party/rapidhash-v8/README.chromium @@ -19,3 +19,5 @@ particular version is copied over from Chromium. Local Modifications: - Copied over from Chromium's third_party/rapidhash with all its changes. - Removed base/ includes and replaced with V8 versions. +- mul_mod in secret.h uses a 128-bit multiply and modulo where the compiler + runtime provides one. diff --git a/deps/v8/third_party/rapidhash-v8/secret.h b/deps/v8/third_party/rapidhash-v8/secret.h index 021125bc4ce8..f6243199a14f 100644 --- a/deps/v8/third_party/rapidhash-v8/secret.h +++ b/deps/v8/third_party/rapidhash-v8/secret.h @@ -81,6 +81,12 @@ static inline uint64_t wyrand(uint64_t* seed) { static inline unsigned long long mul_mod(unsigned long long a, unsigned long long b, unsigned long long m) { +#if defined(__SIZEOF_INT128__) && !defined(_WIN32) + // A 128-bit multiply and modulo lower to __umodti3 from compiler-rt, which + // clang's Windows runtime does not provide. + return static_cast( + (static_cast<__uint128_t>(a) * b) % m); +#else unsigned long long r = 0; while (b) { if (b & 1) { @@ -96,6 +102,7 @@ static inline unsigned long long mul_mod(unsigned long long a, } } return r; +#endif } static inline unsigned long long pow_mod(unsigned long long a,