Skip to content

Commit 98d8fc1

Browse files
committed
added rdrand feature and removed rdrnd feature
1 parent 27a046e commit 98d8fc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustc_trans/llvm_util.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ unsafe fn configure_llvm(sess: &Session) {
7575
llvm_args.as_ptr());
7676
}
7777

78-
// WARNING: the features must be known to LLVM or the feature
79-
// detection code will walk past the end of the feature array,
80-
// leading to crashes.
78+
// WARNING: the features after aplpying `to_llvm_feature` must be known
79+
// to LLVM or the feature detection code will walk past the end of the feature
80+
// array, leading to crashes.
8181

8282
const ARM_WHITELIST: &'static [&'static str] = &["neon", "v7", "vfp2", "vfp3", "vfp4"];
8383

@@ -86,7 +86,7 @@ const AARCH64_WHITELIST: &'static [&'static str] = &["neon", "v7"];
8686
const X86_WHITELIST: &'static [&'static str] = &["avx", "avx2", "bmi", "bmi2", "sse",
8787
"sse2", "sse3", "sse4.1", "sse4.2",
8888
"ssse3", "tbm", "lzcnt", "popcnt",
89-
"sse4a", "rdrnd", "rdseed", "fma",
89+
"sse4a","fma", "rdrand", "rdseed",
9090
"xsave", "xsaveopt", "xsavec",
9191
"xsaves", "aes", "pclmulqdq",
9292
"avx512bw", "avx512cd",
@@ -108,6 +108,7 @@ const MIPS_WHITELIST: &'static [&'static str] = &["msa"];
108108
pub fn to_llvm_feature(s: &str) -> &str {
109109
match s {
110110
"pclmulqdq" => "pclmul",
111+
"rdrand" => "rdrnd",
111112
s => s,
112113
}
113114
}

0 commit comments

Comments
 (0)