Skip to main content

ab_riscv_interpreter/rv64/zk/
zkn.rs

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