Skip to main content

ab_riscv_interpreter/rv32/zk/
zkn.rs

1//! RV32 Zkn extension
2
3pub mod zknd;
4pub mod zkne;
5pub mod zknh;
6
7use crate::rv32::b::zbc::rv32_zbc_helpers;
8use crate::rv32::zk::zbkb::rv32_zbkb_helpers;
9use crate::rv32::zk::zbkx::rv32_zbkx_helpers;
10use crate::rv32::zk::zkn::zknd::rv32_zknd_helpers;
11use crate::rv32::zk::zkn::zkne::rv32_zkne_helpers;
12use crate::rv32::zk::zkn::zknh::rv32_zknh_helpers;
13use crate::{ExecutableInstruction, ExecutionError, RegisterFile};
14use ab_riscv_macros::instruction_execution;
15use ab_riscv_primitives::prelude::*;
16use core::ops::ControlFlow;
17
18#[instruction_execution]
19impl<Reg, Regs, ExtState, Memory, PC, InstructionHandler, CustomError>
20    ExecutableInstruction<Regs, ExtState, Memory, PC, InstructionHandler, CustomError>
21    for Rv32ZknInstruction<Reg>
22where
23    Reg: Register<Type = u32>,
24{
25    #[inline(always)]
26    fn execute(
27        self,
28        regs: &mut Regs,
29        _ext_state: &mut ExtState,
30        _memory: &mut Memory,
31        _program_counter: &mut PC,
32        _system_instruction_handler: &mut InstructionHandler,
33    ) -> Result<ControlFlow<()>, ExecutionError<Reg::Type, CustomError>> {
34        Ok(ControlFlow::Continue(()))
35    }
36}