aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/wasm-external-refs.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-07 08:54:53 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-07 16:48:52 +0100
commit88786fecff336342a56e6f2e7ff3b286be716e47 (patch)
tree92e6ba5b8ac8dae1a058988d20c9d27bfa654390 /deps/v8/src/wasm/wasm-external-refs.cc
parent4e86f9b5ab83cbabf43839385bf383e6a7ef7d19 (diff)
downloadandroid-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.tar.gz
android-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.tar.bz2
android-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.zip
deps: update V8 to 6.5.254.31
PR-URL: https://github.com/nodejs/node/pull/18453 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/v8/src/wasm/wasm-external-refs.cc')
-rw-r--r--deps/v8/src/wasm/wasm-external-refs.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/deps/v8/src/wasm/wasm-external-refs.cc b/deps/v8/src/wasm/wasm-external-refs.cc
index 238785ca3c..0a9d1401e3 100644
--- a/deps/v8/src/wasm/wasm-external-refs.cc
+++ b/deps/v8/src/wasm/wasm-external-refs.cc
@@ -55,7 +55,7 @@ void uint64_to_float32_wrapper(uint64_t* input, float* output) {
// achieve proper rounding in all cases we have to adjust the high_word
// with a "rounding bit" sometimes. The rounding bit is stored in the LSB of
// the high_word if the low_word may affect the rounding of the high_word.
- uint32_t low_word = static_cast<uint32_t>(*input & 0xffffffff);
+ uint32_t low_word = static_cast<uint32_t>(*input & 0xFFFFFFFF);
uint32_t high_word = static_cast<uint32_t>(*input >> 32);
float shift = static_cast<float>(1ull << 32);
@@ -65,7 +65,7 @@ void uint64_to_float32_wrapper(uint64_t* input, float* output) {
shift = static_cast<float>(1ull << 31);
}
- if ((high_word & 0xfe000000) && low_word) {
+ if ((high_word & 0xFE000000) && low_word) {
// Set the rounding bit.
high_word |= 1;
}
@@ -91,7 +91,7 @@ void uint64_to_float64_wrapper(uint64_t* input, double* output) {
// static_cast<double>(uint64_t) to achieve round-to-nearest-ties-even
// semantics. The idea is to calculate
// static_cast<double>(high_word) * 2^32 + static_cast<double>(low_word).
- uint32_t low_word = static_cast<uint32_t>(*input & 0xffffffff);
+ uint32_t low_word = static_cast<uint32_t>(*input & 0xFFFFFFFF);
uint32_t high_word = static_cast<uint32_t>(*input >> 32);
double shift = static_cast<double>(1ull << 32);
@@ -201,21 +201,29 @@ int32_t uint64_mod_wrapper(uint64_t* dst, uint64_t* src) {
}
uint32_t word32_ctz_wrapper(uint32_t* input) {
- return static_cast<uint32_t>(base::bits::CountTrailingZeros(*input));
+ return base::bits::CountTrailingZeros(*input);
}
uint32_t word64_ctz_wrapper(uint64_t* input) {
- return static_cast<uint32_t>(
- base::bits::CountTrailingZeros(ReadUnalignedValue<uint64_t>(input)));
+ return base::bits::CountTrailingZeros(ReadUnalignedValue<uint64_t>(input));
}
uint32_t word32_popcnt_wrapper(uint32_t* input) {
- return static_cast<uint32_t>(base::bits::CountPopulation(*input));
+ return base::bits::CountPopulation(*input);
}
uint32_t word64_popcnt_wrapper(uint64_t* input) {
- return static_cast<uint32_t>(
- base::bits::CountPopulation(ReadUnalignedValue<uint64_t>(input)));
+ return base::bits::CountPopulation(ReadUnalignedValue<uint64_t>(input));
+}
+
+uint32_t word32_rol_wrapper(uint32_t* input_p, uint32_t* shift_p) {
+ uint32_t shift = (*shift_p & 31);
+ return (*input_p << shift) | (*input_p >> (32 - shift));
+}
+
+uint32_t word32_ror_wrapper(uint32_t* input_p, uint32_t* shift_p) {
+ uint32_t shift = (*shift_p & 31);
+ return (*input_p >> shift) | (*input_p << (32 - shift));
}
void float64_pow_wrapper(double* param0, double* param1) {