summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/llvm_util.rs
AgeCommit message (Collapse)AuthorLines
2018-09-05Auto merge of #53878 - alexcrichton:wasm-atomics-feature, r=eddybbors-0/+1
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.
2018-09-03whitelist some ARM featuresJorge Aparicio-0/+4
2018-08-31rustc: Prepare the `atomics` feature for wasmAlex Crichton-0/+1
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.
2018-08-28Fix warnings about the `native` target-cpuAlex Crichton-0/+18
This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
2018-08-08Add wasm32 simd128 target featuregnzlbg-0/+6
2018-07-30rustc_llvm: move to rustc_codegen_llvm::llvm.Irina Popa-1/+1
2018-07-25ARM: expose `rclass` and `dsp` target featuresPaolo Teti-0/+2
- `dsp`: the subtarget supports the DSP (saturating arith. and such) instructions - `rclass`: target is a Cortex-R Both features are useful to support ARM MCUs on `coresimd`. Note: Cortex-R52 is the first Armv8-R with `neon` support
2018-07-06ARM: expose the "mclass" target featureJorge Aparicio-0/+1
2018-05-17Rename trans to codegen everywhere.Irina Popa-0/+255