@@ -75,26 +75,25 @@ unsafe fn configure_llvm(sess: &Session) {
75
75
llvm_args. as_ptr ( ) ) ;
76
76
}
77
77
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 applying `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.
81
81
82
82
const ARM_WHITELIST : & ' static [ & ' static str ] = & [ "neon" , "v7" , "vfp2" , "vfp3" , "vfp4" ] ;
83
83
84
84
const AARCH64_WHITELIST : & ' static [ & ' static str ] = & [ "neon" , "v7" ] ;
85
85
86
- const X86_WHITELIST : & ' static [ & ' static str ] = & [ "avx" , "avx2" , "bmi" , "bmi2" , "sse" ,
87
- "sse2" , "sse3" , "sse4.1" , "sse4.2" ,
88
- "ssse3" , "tbm" , "lzcnt" , "popcnt" ,
89
- "sse4a" , "rdrnd" , "rdseed" , "fma" ,
90
- "xsave" , "xsaveopt" , "xsavec" ,
91
- "xsaves" , "aes" , "pclmulqdq" ,
92
- "avx512bw" , "avx512cd" ,
93
- "avx512dq" , "avx512er" ,
94
- "avx512f" , "avx512ifma" ,
95
- "avx512pf" , "avx512vbmi" ,
96
- "avx512vl" , "avx512vpopcntdq" ,
97
- "mmx" , "fxsr" ] ;
86
+ const X86_WHITELIST : & ' static [ & ' static str ] = & [ "aes" , "avx" , "avx2" , "avx512bw" ,
87
+ "avx512cd" , "avx512dq" , "avx512er" ,
88
+ "avx512f" , "avx512ifma" , "avx512pf" ,
89
+ "avx512vbmi" , "avx512vl" , "avx512vpopcntdq" ,
90
+ "bmi" , "bmi2" , "fma" , "fxsr" ,
91
+ "lzcnt" , "mmx" , "pclmulqdq" ,
92
+ "popcnt" , "rdrand" , "rdseed" ,
93
+ "sse" , "sse2" , "sse3" , "sse4.1" ,
94
+ "sse4.2" , "sse4a" , "ssse3" ,
95
+ "tbm" , "xsave" , "xsavec" ,
96
+ "xsaveopt" , "xsaves" ] ;
98
97
99
98
const HEXAGON_WHITELIST : & ' static [ & ' static str ] = & [ "hvx" , "hvx-double" ] ;
100
99
@@ -108,6 +107,7 @@ const MIPS_WHITELIST: &'static [&'static str] = &["msa"];
108
107
pub fn to_llvm_feature ( s : & str ) -> & str {
109
108
match s {
110
109
"pclmulqdq" => "pclmul" ,
110
+ "rdrand" => "rdrnd" ,
111
111
s => s,
112
112
}
113
113
}
0 commit comments