about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-08-31 22:41:17 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-08-31 22:47:10 -0700
commitfc497d00263be103ca9d009206963d4a5763392d (patch)
tree76a650729348ab24f0252061d5863409d5ea41da /src/liballoc
parent06a59da5af0cadf478d8ab9e1725fa367fb19cd2 (diff)
downloadrust-fc497d00263be103ca9d009206963d4a5763392d.tar.gz
rust-fc497d00263be103ca9d009206963d4a5763392d.zip
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/liballoc')
0 files changed, 0 insertions, 0 deletions