Auto merge of #53878 - alexcrichton:wasm-atomics-feature, r=eddyb
rustc: Prepare the `atomics` feature for wasm This commit adds a few changes for atomic instructions on the `wasm32-unknown-unknown` target. Atomic instructions are not yet stable in WebAssembly itself but there are multiple implementations and LLVM has support for the proposed instruction set, so let's work on exposing it! Here there are a few inclusions: * The `atomics` feature was whitelisted for LLVM, allowing code in Rust to enable/disable/gate on this. * The `singlethread` option is turned off for wasm when the `atomics` feature is enabled. This means that by default wasm won't be lowering with atomics, but when atomics are enabled globally we'll turn off single-threaded mode to actually codegen atomics. This probably isn't what we'll want in the long term but for now it should work. * Finally the maximum atomic width is increased to 64 to reflect the current wasm spec.
This commit is contained in:
commit
d8af8b66d9
3 changed files with 15 additions and 6 deletions
|
@ -177,6 +177,7 @@ const MIPS_WHITELIST: &[(&str, Option<&str>)] = &[
|
|||
|
||||
const WASM_WHITELIST: &[(&str, Option<&str>)] = &[
|
||||
("simd128", Some("wasm_target_feature")),
|
||||
("atomics", Some("wasm_target_feature")),
|
||||
];
|
||||
|
||||
/// When rustdoc is running, provide a list of all known features so that all their respective
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue