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 180c150

Browse filesBrowse files
richardlauaduh95
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 PR-URL: #62449 Refs: v8/v8@cf1bce4 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent bc265aa commit 180c150
Copy full SHA for 180c150

1 file changed

+10Lines changed: 10 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
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.