about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-05 13:19:19 +0000
committerbors <bors@rust-lang.org>2018-09-05 13:19:19 +0000
commitd8af8b66d948ff394db1b3a50e2e4fbe02512239 (patch)
tree79946ce7129c7829ca978f39dc1e2ea41626899d /src/libsyntax
parentb0297f3043e4ed592c63c0bcc11df3655ec8cf46 (diff)
parentfc497d00263be103ca9d009206963d4a5763392d (diff)
downloadrust-d8af8b66d948ff394db1b3a50e2e4fbe02512239.tar.gz
rust-d8af8b66d948ff394db1b3a50e2e4fbe02512239.zip
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.
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions