Skip to content

Commit fbb56bc

Browse files
committed
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.
1 parent 1897657 commit fbb56bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_codegen_llvm/llvm_util.rs

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ const X86_WHITELIST: &[(&str, Option<&str>)] = &[
140140
("avx512vpopcntdq", Some("avx512_target_feature")),
141141
("bmi1", None),
142142
("bmi2", None),
143+
("cmpxchg16b", Some("cmpxchg16b_target_feature")),
143144
("fma", None),
144145
("fxsr", None),
145146
("lzcnt", None),
@@ -212,6 +213,7 @@ pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
212213
("x86", "pclmulqdq") => "pclmul",
213214
("x86", "rdrand") => "rdrnd",
214215
("x86", "bmi1") => "bmi",
216+
("x86", "cmpxchg16b") => "cx16",
215217
("aarch64", "fp") => "fp-armv8",
216218
("aarch64", "fp16") => "fullfp16",
217219
(_, s) => s,

0 commit comments

Comments
 (0)