summaryrefslogtreecommitdiff
path: root/src/asmjs
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-06-23 16:36:58 -0700
committerGitHub <noreply@github.com>2020-06-23 16:36:58 -0700
commit8540db83abf2044bbabb85e293e5b98a4bb4b9a8 (patch)
tree469c90072942f5826360c098259b43056c186f00 /src/asmjs
parentbaec7c0ff1ba483f38b4e8a13c5295ad6534e7d9 (diff)
downloadbinaryen-8540db83abf2044bbabb85e293e5b98a4bb4b9a8.tar.gz
binaryen-8540db83abf2044bbabb85e293e5b98a4bb4b9a8.tar.bz2
binaryen-8540db83abf2044bbabb85e293e5b98a4bb4b9a8.zip
wasm2js: Avoid 64-bit scratch memory helpers in wasm-intrinsics (#2926)
That code originally used memory location 1024 to save 64 bits of data (as that is what rust does apparently). We refactored it manually to instead use a scratch memory helper, which is safer. However, that 64-bit function ends up legalized, which actually changes the interface between the module and the outside, which is confusing and causes problems with optimizations that can remove the getTempRet0 imports, see emscripten-core/emscripten#11456 Instead, just use a global i64 to stash those bits. This requires adding support for copying globals from the intrinsics module, but otherwise seems simpler overall.
Diffstat (limited to 'src/asmjs')
-rw-r--r--src/asmjs/shared-constants.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/asmjs/shared-constants.cpp b/src/asmjs/shared-constants.cpp
index 8a13cf55c..37594108a 100644
--- a/src/asmjs/shared-constants.cpp
+++ b/src/asmjs/shared-constants.cpp
@@ -113,8 +113,6 @@ namespace wasm2js {
cashew::IString SCRATCH_LOAD_I32("wasm2js_scratch_load_i32");
cashew::IString SCRATCH_STORE_I32("wasm2js_scratch_store_i32");
-cashew::IString SCRATCH_LOAD_I64("wasm2js_scratch_load_i64");
-cashew::IString SCRATCH_STORE_I64("wasm2js_scratch_store_i64");
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");