Coverage Report

Created: 2026-08-28 08:35

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wasmtime/cranelift/fuzzgen/src/target_isa_extras.rs
Line
Count
Source
1
use cranelift::prelude::isa::TargetIsa;
2
use target_lexicon::Architecture;
3
4
pub trait TargetIsaExtras {
5
    fn supports_simd(&self) -> bool;
6
}
7
8
impl TargetIsaExtras for &dyn TargetIsa {
9
1.03M
    fn supports_simd(&self) -> bool {
10
1.03M
        match self.triple().architecture {
11
            // RISC-V only supports SIMD with the V extension.
12
90.4k
            Architecture::Riscv64(_) => self
13
90.4k
                .isa_flags()
14
90.4k
                .iter()
15
723k
                .find(|f| f.name == "has_v")
16
90.4k
                .and_then(|f| f.as_bool())
17
90.4k
                .unwrap_or(false),
18
948k
            _ => true,
19
        }
20
1.03M
    }
21
}