bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.36k stars 1.3k forks source link

x64/newBE: Implement atomic operations for 128bit integers #2665

Open bjorn3 opened 3 years ago

bjorn3 commented 3 years ago

Feature

See title

Benefit

Necessary for compiler-builtins to compile with cg_clif on macOS and other x86 targets that are specified to support 128bit atomics.

Implementation

Use cmpxchg16b

Alternatives

bjorn3 commented 1 year ago

Rust is close to stabilizing the cmpchg16b vendor intrinsic, which requires this. On AArch64 I also already need a patch to disable AtomicU128 in libstd.

cfallin commented 1 year ago

We'd be happy to review a PR for this; might make a good starter issue. (Otherwise I'm not sure if someone has the bandwidth to implement it it in the short term.)