diff --git a/common.gypi b/common.gypi index f7c219fc8f167d..953a1448d4baa5 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,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.16', + 'v8_embedder_string': '-node.17', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/wasm/constant-expression-interface.cc b/deps/v8/src/wasm/constant-expression-interface.cc index 757b4a1811916a..2d86929c011660 100644 --- a/deps/v8/src/wasm/constant-expression-interface.cc +++ b/deps/v8/src/wasm/constant-expression-interface.cc @@ -40,7 +40,17 @@ void ConstantExpressionInterface::S128Const(FullDecoder* decoder, const Simd128Immediate& imm, Value* result) { if (!generate_value()) return; +#if V8_TARGET_BIG_ENDIAN + // Globals are not little endian enforced, they use native byte order and we + // need to reverse the bytes on big endian platforms. + uint8_t value[kSimd128Size]; + for (int i = 0; i < kSimd128Size; i++) { + value[i] = imm.value[kSimd128Size - 1 - i]; + } + result->runtime_value = WasmValue(value, kWasmS128); +#else result->runtime_value = WasmValue(imm.value, kWasmS128); +#endif } void ConstantExpressionInterface::UnOp(FullDecoder* decoder, WasmOpcode opcode,