summaryrefslogtreecommitdiff
path: root/src/asmjs
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-06-22 07:00:13 -0700
committerGitHub <noreply@github.com>2020-06-22 07:00:13 -0700
commit721f15831ca547de98992f9ce6158d822b94d167 (patch)
tree6e898353d04323ff07a687dc3e4456507796feea /src/asmjs
parent711f8cb0ccc0de434a86c6c704acd5a13848f4db (diff)
downloadbinaryen-721f15831ca547de98992f9ce6158d822b94d167.tar.gz
binaryen-721f15831ca547de98992f9ce6158d822b94d167.tar.bz2
binaryen-721f15831ca547de98992f9ce6158d822b94d167.zip
wasm2js: Bulk memory support (#2923)
Adds a special helper functions for data.drop etc., as unlike most wasm instructions these are too big to emit inline. Track passive segments at runtime in var memorySegments whose indexes are the segment indexes. Emit var bufferView even if the memory exists even without memory segments, as we do still need the view in order to operate on it. Also adds a few constants for atomics that will be useful in future PRs (as this PR updates the constant lists anyhow).
Diffstat (limited to 'src/asmjs')
-rw-r--r--src/asmjs/shared-constants.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/asmjs/shared-constants.cpp b/src/asmjs/shared-constants.cpp
index 58742fb1d..8a13cf55c 100644
--- a/src/asmjs/shared-constants.cpp
+++ b/src/asmjs/shared-constants.cpp
@@ -119,6 +119,13 @@ cashew::IString SCRATCH_LOAD_F32("wasm2js_scratch_load_f32");
cashew::IString SCRATCH_STORE_F32("wasm2js_scratch_store_f32");
cashew::IString SCRATCH_LOAD_F64("wasm2js_scratch_load_f64");
cashew::IString SCRATCH_STORE_F64("wasm2js_scratch_store_f64");
+cashew::IString MEMORY_INIT("wasm2js_memory_init");
+cashew::IString MEMORY_FILL("wasm2js_memory_fill");
+cashew::IString MEMORY_COPY("wasm2js_memory_copy");
+cashew::IString DATA_DROP("wasm2js_data_drop");
+cashew::IString ATOMIC_WAIT_I32("wasm2js_atomic_wait_i32");
+cashew::IString ATOMIC_RMW_I64("wasm2js_atomic_rmw_i64");
+cashew::IString GET_STASHED_BITS("wasm2js_get_stashed_bits");
} // namespace wasm2js
} // namespace ABI