Cranelift's documentation states that the various atomic operations it has are sequentially consistent. Is there a way to use e.g. relaxed ordering instead?
https://github.com/bytecodealliance/wasmtime/blob/b583c54fda13b53dea362861125dd1e2ced1381d/cranelift/codegen/src/isa/x64/lower.isle#L3213-L3223 suggests that on x86-64 it's at least a regular MOV, but it would be nice to have precise control over that; unless Cranelift always uses the equivalent of acquire/release
this is part of the wasm threads specification unfortunately; it would be nice if wasm had support for some or all of the modes used by modern memory models (montonic/opaque/relaxed, acquire, release, sequentiually-consistent)
right now it's just plain or full-blown sequential consistency
and, of course none of these modes at all can interoperate with the host GC specification...
Yikes :confused:
I created https://github.com/bytecodealliance/wasmtime/issues/7722 to further discuss this :smile:
Last updated: Dec 23 2024 at 12:05 UTC