[lld] 9369b7d - [lld][WebAssembly] Limit size of shared 64-bit memories of 2^^34
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 12:22:45 PST 2023
Author: Sam Clegg
Date: 2023-02-13T12:21:32-08:00
New Revision: 9369b7d307be0aa1cf430203f2d5f1f71a7a04b8
URL: https://github.com/llvm/llvm-project/commit/9369b7d307be0aa1cf430203f2d5f1f71a7a04b8
DIFF: https://github.com/llvm/llvm-project/commit/9369b7d307be0aa1cf430203f2d5f1f71a7a04b8.diff
LOG: [lld][WebAssembly] Limit size of shared 64-bit memories of 2^^34
This is current limit in v8. See
https://github.com/WebAssembly/memory64/issues/33 how we might change
this in the future.
Differential Revision: https://reviews.llvm.org/D143783
Added:
Modified:
lld/wasm/Writer.cpp
Removed:
################################################################################
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 8fe0b060b248f..339448af6da24 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -348,7 +348,12 @@ void Writer::layoutMemory() {
WasmSym::heapBase->setVA(memoryPtr);
}
- uint64_t maxMemorySetting = 1ULL << (config->is64.value_or(false) ? 48 : 32);
+ uint64_t maxMemorySetting = 1ULL << 32;
+ if (config->is64.value_or(false)) {
+ // TODO: Update once we decide on a reasonable limit here:
+ // https://github.com/WebAssembly/memory64/issues/33
+ maxMemorySetting = 1ULL << 34;
+ }
if (config->initialMemory != 0) {
if (config->initialMemory != alignTo(config->initialMemory, WasmPageSize))
More information about the llvm-commits
mailing list