Skip to content

Commit

Permalink
rustc: Add the cmpxchg16b target feature on x86/x86_64
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Dec 14, 2018
1 parent 1897657 commit fbb56bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_codegen_llvm/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fbb56bc

Please sign in to comment.