Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f8f288

Browse filesBrowse files
richardlauRafaelGSS
authored andcommitted
deps: V8: cherry-pick cf1bce40a5ef
Original commit message: [wasm] Fix S128Const on big endian Since http://crrev.com/c/2944437 globals are no longer little endian enforced. S128Const handling in the initializer needs to take this into account and byte reverse values which are hard coded in little endian order. This is currently causing failures on Node.js upstream: #59034 (comment) Change-Id: Ifcc9ade93ee51565ab19b16e9dadf0ff5752f7a6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7704213 Commit-Queue: Milad Farazmand <mfarazma@ibm.com> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#106082} Refs: v8/v8@cf1bce4 Refs: v8/v8@cf1bce4 PR-URL: #61898 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> (cherry picked from commit cc5a331)
1 parent d7eccac commit 1f8f288
Copy full SHA for 1f8f288

2 files changed

+11-1Lines changed: 11 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.11',
41+
'v8_embedder_string': '-node.12',
4242

4343
##### V8 defaults for Node.js #####
4444

Collapse file

‎deps/v8/src/wasm/constant-expression-interface.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/wasm/constant-expression-interface.cc
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@ void ConstantExpressionInterface::S128Const(FullDecoder* decoder,
4040
const Simd128Immediate& imm,
4141
Value* result) {
4242
if (!generate_value()) return;
43+
#if V8_TARGET_BIG_ENDIAN
44+
// Globals are not little endian enforced, they use native byte order and we
45+
// need to reverse the bytes on big endian platforms.
46+
uint8_t value[kSimd128Size];
47+
for (int i = 0; i < kSimd128Size; i++) {
48+
value[i] = imm.value[kSimd128Size - 1 - i];
49+
}
50+
result->runtime_value = WasmValue(value, kWasmS128);
51+
#else
4352
result->runtime_value = WasmValue(imm.value, kWasmS128);
53+
#endif
4454
}
4555

4656
void ConstantExpressionInterface::UnOp(FullDecoder* decoder, WasmOpcode opcode,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.