This code currently assumes that all bulk memory operations occur on
memory 0 which who's type is determined by the wasm32 vs wasm64 target
triple. Further improvement would be need to support multi-memory.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This following emscripten change is currently blocked due to this bug: https://github.com/emscripten-core/emscripten/pull/19128
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp | ||
---|---|---|
283 | For memory.init, the correct type should be [ptr i32 i32] -> [] acording to https://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md#:~:text=grow%20%3A%20%5Bit%5D%20%E2%86%92%20%5Bit%5D-,memory,-.fill |
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp | ||
---|---|---|
283 | Good point... I guess it was decided that each individual segment could never exceed i32 space? |
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp | ||
---|---|---|
283 | Yeah, I guess that's the reason. |
For memory.init, the correct type should be [ptr i32 i32] -> [] acording to https://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md#:~:text=grow%20%3A%20%5Bit%5D%20%E2%86%92%20%5Bit%5D-,memory,-.fill