summaryrefslogtreecommitdiff
path: root/src/abi/js.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-02-14 16:36:36 -0600
committerGitHub <noreply@github.com>2023-02-14 14:36:36 -0800
commit8f98375c051f2b8e1be87e7eb97e88d73cfb2c26 (patch)
tree171ab05759465e63ebe7ce898585813801820cbd /src/abi/js.h
parent3a315fb8248be7a2a7b7e27ebfde634d05668bf3 (diff)
downloadbinaryen-8f98375c051f2b8e1be87e7eb97e88d73cfb2c26.tar.gz
binaryen-8f98375c051f2b8e1be87e7eb97e88d73cfb2c26.tar.bz2
binaryen-8f98375c051f2b8e1be87e7eb97e88d73cfb2c26.zip
[wasm2js] Support nonzero offsets in memory.atomic.wait32 (#5489)
The assertion that the offset is zero does not necessarily hold for code that uses this instruction via the clang builtin. Add support so that Emscripten wasm2js tests pass in the presence of such code.
Diffstat (limited to 'src/abi/js.h')
-rw-r--r--src/abi/js.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/abi/js.h b/src/abi/js.h
index 735f71af7..d22376c13 100644
--- a/src/abi/js.h
+++ b/src/abi/js.h
@@ -82,8 +82,9 @@ inline void ensureHelpers(Module* wasm, IString specific = IString()) {
ensureImport(MEMORY_FILL, {Type::i32, Type::i32, Type::i32}, Type::none);
ensureImport(MEMORY_COPY, {Type::i32, Type::i32, Type::i32}, Type::none);
ensureImport(DATA_DROP, {Type::i32}, Type::none);
- ensureImport(
- ATOMIC_WAIT_I32, {Type::i32, Type::i32, Type::i32, Type::i32}, Type::i32);
+ ensureImport(ATOMIC_WAIT_I32,
+ {Type::i32, Type::i32, Type::i32, Type::i32, Type::i32},
+ Type::i32);
ensureImport(
ATOMIC_RMW_I64,
{Type::i32, Type::i32, Type::i32, Type::i32, Type::i32, Type::i32},