Coverage Report

Created: 2026-09-28 08:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wasmtime/cranelift/codegen/src/isa/riscv64/lower.rs
Line
Count
Source
1
//! Lowering rules for Riscv64.
2
use crate::ir::Inst as IRInst;
3
use crate::isa::riscv64::Riscv64Backend;
4
use crate::isa::riscv64::inst::*;
5
use crate::machinst::*;
6
pub mod isle;
7
8
//=============================================================================
9
// Lowering-backend trait implementation.
10
11
impl LowerBackend for Riscv64Backend {
12
    type MInst = Inst;
13
14
393k
    fn lower(&self, ctx: &mut Lower<Inst>, ir_inst: IRInst) -> Option<InstOutput> {
15
393k
        isle::lower(ctx, self, ir_inst)
16
393k
    }
17
18
150k
    fn lower_branch(
19
150k
        &self,
20
150k
        ctx: &mut Lower<Inst>,
21
150k
        ir_inst: IRInst,
22
150k
        targets: &[MachLabel],
23
150k
    ) -> Option<()> {
24
150k
        isle::lower_branch(ctx, self, ir_inst, targets)
25
150k
    }
26
27
4.18k
    fn maybe_pinned_reg(&self) -> Option<Reg> {
28
        // pinned register is a register that you want put anything in it.
29
        // right now riscv64 not support this feature.
30
4.18k
        None
31
4.18k
    }
32
}