Skip to content

Commit 25822bc

Browse files
committed
Updated documentation, x86 feature detection testing, and removed LLVM 9 exclusive features
Updated the added documentation in llvm_util.rs to note which copies of LLVM need to be inspected. Removed avx512bf16 and avx512vp2intersect because they are unsupported before LLVM 9 with the build with external LLVM 8 being supported Re-introduced detection testing previously removed for un-requestable features tsc and mmx
1 parent 7a7e5d4 commit 25822bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

std/tests/run-time-detect.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ fn powerpc64_linux() {
5454
#[test]
5555
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
5656
fn x86_all() {
57+
// the below is the set of features we can test at runtime, but don't actually
58+
// use to gate anything and are thus not part of the X86_ALLOWED_FEATURES list
59+
60+
println!("abm: {:?}", is_x86_feature_detected!("abm")); // this is a synonym for lzcnt but we test it anyways
61+
println!("mmx: {:?}", is_x86_feature_detected!("mmx"));
62+
println!("tsc: {:?}", is_x86_feature_detected!("tsc"));
63+
5764
// the below is in alphabetical order and matches
5865
// the order of X86_ALLOWED_FEATURES in rustc_codegen_ssa's target_features.rs
5966

0 commit comments

Comments
 (0)