[PATCH] D147540: [MC][WebAssembly] For type checking for bulk memory instructions

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 12:06:13 PDT 2023


sbc100 added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp:283
+      return true;
+  } else if (Name == "memory.copy" || Name == "memory.init") {
+    Type = is64 ? wasm::ValType::I64 : wasm::ValType::I32;
----------------
tlively wrote:
> 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
Good point... I guess it was decided that each individual segment could never exceed i32 space?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147540/new/

https://reviews.llvm.org/D147540



More information about the llvm-commits mailing list