From c866e1f812b7436abce2b03ec56d62c77d6684a2 Mon Sep 17 00:00:00 2001 From: Caleb Zulawski Date: Mon, 29 Jul 2024 00:09:47 -0400 Subject: [PATCH] Add missing features --- compiler/rustc_target/src/target_features.rs | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index 5b79495831a..64f966d7a30 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -414,8 +414,22 @@ const X86_IMPLIED_FEATURES: &[(&str, &[&str])] = &[ ("aes", &["sse2"]), ("avx", &["sse4.2"]), ("avx2", &["avx"]), + ("avx512bf16", &["avx512bw"]), + ("avx512bitalg", &["avx512bw"]), + ("avx512bw", &["avx512f"]), + ("avx512cd", &["avx512f"]), + ("avx512dq", &["avx512f"]), + ("avx512f", &["avx2"]), + ("avx512fp16", &["avx512bw", "avx512vl", "avx512dq"]), + ("avx512vbmi", &["avx512bw"]), + ("avx512vbmi2", &["avx512bw"]), + ("avx512vl", &["avx512f"]), + ("avx512vnni", &["avx512f"]), + ("avx512vp2intersect", &["avx512f"]), + ("avx512vpopcntdq", &["avx512f"]), ("f16c", &["avx"]), ("fma", &["avx"]), + ("gfni", &["sse2"]), ("pclmulqdq", &["sse2"]), ("sha", &["sse2"]), ("sse2", &["sse"]), @@ -423,6 +437,11 @@ const X86_IMPLIED_FEATURES: &[(&str, &[&str])] = &[ ("sse4.1", &["ssse3"]), ("sse4.2", &["sse4.1"]), ("ssse3", &["sse3"]), + ("vaes", &["avx", "aes"]), + ("vpclmulqdq", &["avx", "pclmulqdq"]), + ("xsavec", &["xsave"]), + ("xsaveopt", &["xsave"]), + ("xsaves", &["xsave"]), // tidy-alphabetical-end ]; @@ -457,6 +476,12 @@ const RISCV_IMPLIED_FEATURES: &[(&str, &[&str])] = &[ // tidy-alphabetical-end ]; +const WASM_IMPLIED_FEATURES: &[(&str, &[&str])] = &[ + // tidy-alphabetical-start + ("relaxed-simd", &["simd128"]), + // tidy-alphabetical-end +]; + /// When rustdoc is running, provide a list of all known features so that all their respective /// primitives may be documented. /// @@ -509,6 +534,7 @@ impl super::spec::Target { "aarch4" => AARCH64_IMPLIED_FEATURES, "riscv32" | "riscv64" => RISCV_IMPLIED_FEATURES, "x86" | "x86_64" => X86_IMPLIED_FEATURES, + "wasm32" | "wasm64" => WASM_IMPLIED_FEATURES, _ => &[], } }