diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-12-14 11:40:27 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-12-14 12:00:01 -0800 |
| commit | fbb56bcf44d28e65a9495decf091b6d0386e540c (patch) | |
| tree | c13a41a6822c75794e0c921ac2da1d21b13e9c35 /src/librustc_codegen_llvm | |
| parent | 1897657ef09eea3d0b0afbbbd154a12fbb8fbf3f (diff) | |
| download | rust-fbb56bcf44d28e65a9495decf091b6d0386e540c.tar.gz rust-fbb56bcf44d28e65a9495decf091b6d0386e540c.zip | |
rustc: Add the `cmpxchg16b` target feature on x86/x86_64
This appears to be called `cx16` in LLVM and a few other locations, but the Intel Intrinsic Guide doesn't have a name for this and the CPU manual from Intel only mentions `cmpxchg16b`, so that's the name chosen here.
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/llvm_util.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index 12109ae1662..82b1d7e8b40 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -140,6 +140,7 @@ const X86_WHITELIST: &[(&str, Option<&str>)] = &[ ("avx512vpopcntdq", Some("avx512_target_feature")), ("bmi1", None), ("bmi2", None), + ("cmpxchg16b", Some("cmpxchg16b_target_feature")), ("fma", None), ("fxsr", None), ("lzcnt", None), @@ -212,6 +213,7 @@ pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str { ("x86", "pclmulqdq") => "pclmul", ("x86", "rdrand") => "rdrnd", ("x86", "bmi1") => "bmi", + ("x86", "cmpxchg16b") => "cx16", ("aarch64", "fp") => "fp-armv8", ("aarch64", "fp16") => "fullfp16", (_, s) => s, |
