From 42fbe08bdfa7686c376a067f8fbbfed0e56ef938 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 23 Apr 2019 10:24:46 +0200 Subject: [PATCH] Add automatic-verification for the F16C intrinsics --- .../stdarch/crates/stdsimd-verify/tests/x86-intel.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/library/stdarch/crates/stdsimd-verify/tests/x86-intel.rs b/library/stdarch/crates/stdsimd-verify/tests/x86-intel.rs index 3de07f30f485..49799a5854ac 100644 --- a/library/stdarch/crates/stdsimd-verify/tests/x86-intel.rs +++ b/library/stdarch/crates/stdsimd-verify/tests/x86-intel.rs @@ -293,11 +293,16 @@ fn matches(rust: &Function, intel: &Intrinsic) -> Result<(), String> { .flat_map(|c| c.to_lowercase()) .collect::(); - // The XML file names IFMA as "avx512ifma52", while Rust calls - // it "avx512ifma". Fix this mismatch by replacing the Intel - // name with the Rust name. + // Fix mismatching feature names: let fixup_cpuid = |cpuid: String| match cpuid.as_ref() { + // The XML file names IFMA as "avx512ifma52", while Rust calls + // it "avx512ifma". "avx512ifma52" => String::from("avx512ifma"), + // See: https://github.com/rust-lang-nursery/stdsimd/issues/738 + // FIXME: we need to fix "fp16c" to "f16c" here. Since + // https://github.com/rust-lang/rust/pull/60191 is not merged, + // we temporarily map it to "avx512f". + "fp16c" => String::from("avx512f"), _ => cpuid, }; let fixed_cpuid = fixup_cpuid(cpuid);