Skip to content

Commit 20960d1

Browse files
committed
Add missing features
1 parent a6b30fc commit 20960d1

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

compiler/rustc_target/src/target_features.rs

+26
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,34 @@ const X86_IMPLIED_FEATURES: &[(&str, &[&str])] = &[
412412
("aes", &["sse2"]),
413413
("avx", &["sse4.2"]),
414414
("avx2", &["avx"]),
415+
("avx512bf16", &["avx512bw"]),
416+
("avx512bitalg", &["avx512bw"]),
417+
("avx512bw", &["avx512f"]),
418+
("avx512cd", &["avx512f"]),
419+
("avx512dq", &["avx512f"]),
420+
("avx512f", &["avx2"]),
421+
("avx512fp16", &["avx512bw", "avx512vl", "avx512dq"]),
422+
("avx512vbmi", &["avx512bw"]),
423+
("avx512vbmi2", &["avx512bw"]),
424+
("avx512vl", &["avx512f"]),
425+
("avx512vnni", &["avx512f"]),
426+
("avx512vp2intersect", &["avx512f"]),
427+
("avx512vpopcntdq", &["avx512f"]),
415428
("f16c", &["avx"]),
416429
("fma", &["avx"]),
430+
("gfni", &["sse2"]),
417431
("pclmulqdq", &["sse2"]),
418432
("sha", &["sse2"]),
419433
("sse2", &["sse"]),
420434
("sse3", &["sse2"]),
421435
("sse4.1", &["ssse3"]),
422436
("sse4.2", &["sse4.1"]),
423437
("ssse3", &["sse3"]),
438+
("vaes", &["avx", "aes"]),
439+
("vpclmulqdq", &["avx", "pclmulqdq"]),
440+
("xsavec", &["xsave"]),
441+
("xsaveopt", &["xsave"]),
442+
("xsaves", &["xsave"]),
424443
// tidy-alphabetical-end
425444
];
426445

@@ -455,6 +474,12 @@ const RISCV_IMPLIED_FEATURES: &[(&str, &[&str])] = &[
455474
// tidy-alphabetical-end
456475
];
457476

477+
const WASM_IMPLIED_FEATURES: &[(&str, &[&str])] = &[
478+
// tidy-alphabetical-start
479+
("relaxed-simd", &["simd128"]),
480+
// tidy-alphabetical-end
481+
];
482+
458483
/// When rustdoc is running, provide a list of all known features so that all their respective
459484
/// primitives may be documented.
460485
///
@@ -507,6 +532,7 @@ impl super::spec::Target {
507532
"aarch4" => AARCH64_IMPLIED_FEATURES,
508533
"riscv32" | "riscv64" => RISCV_IMPLIED_FEATURES,
509534
"x86" | "x86_64" => X86_IMPLIED_FEATURES,
535+
"wasm32" | "wasm64" => WASM_IMPLIED_FEATURES,
510536
_ => &[],
511537
}
512538
}

0 commit comments

Comments
 (0)