WebAssembly / memory64

Memory with 64-bit indexes
Other
194 stars 21 forks source link

Memory operations from the threads and SIMD proposals #23

Closed lars-t-hansen closed 2 years ago

lars-t-hansen commented 2 years ago

The threads and SIMD proposals both add memory operations that should probably be represented here. (I can't think of any particular complications that would ensue.)

aardappel commented 2 years ago

Yes, those are implemented in the tools (LLVM for sure, WABT/Binaryen should also work), but not explicitly here in this repo, since this repo doesn't explicitly depend on those proposal (though it does include the Bulk Memory dependency).

Now that SIMD is stage 5 though, I guess it could be included in the Overview, WDYT @rossberg ?

lars-t-hansen commented 2 years ago

SIMD has shipped, and I think not including SIMD memory ops here in this unshipped spec would be fairly strange.

If we consider SIMD an optional proposal then it'll be obvious to those implementations that don't have SIMD which instructions to exclude from memory64, and/or we could explicitly call them out in the spec/overview.

The alternative would be to have another proposal that extends the SIMD proposal with memory64 instructions for those implementations that have both, but that seems really bureaucratic to me.

Threads have not yet been shipped in the committee but Chrome and Firefox have shipped threads in release versions (and Safari has them behind a flag), so that proposal is also basically done. I think including the atomic instructions for memory64 here with reference to the threads proposal makes the most sense, though in practical terms the memory64 spec/reference interpreter may not be able to include them because the base spec does not have threads. So maybe this becomes include-in-overview but add the instructions only in the threads spec.

aardappel commented 2 years ago

Ok, I will endeavor to get both simd & atomic memory ops added.. though after my holidays :)