Skip to main content

ab_riscv_interpreter/rv32/
b.rs

1//! RV32 B extension
2
3pub mod zba;
4pub mod zbb;
5pub mod zbc;
6pub mod zbs;
7
8use crate::{ExecutableInstruction, ExecutionError, InterpreterState};
9use ab_riscv_macros::instruction_execution;
10use ab_riscv_primitives::instructions::rv32::b::Rv32BInstruction;
11use ab_riscv_primitives::registers::general_purpose::Register;
12use core::ops::ControlFlow;
13
14#[instruction_execution]
15impl<Reg, ExtState, Memory, PC, InstructionHandler, CustomError>
16    ExecutableInstruction<
17        InterpreterState<Reg, ExtState, Memory, PC, InstructionHandler, CustomError>,
18        CustomError,
19    > for Rv32BInstruction<Reg>
20where
21    Reg: Register<Type = u32>,
22    [(); Reg::N]:,
23{
24    #[inline(always)]
25    fn execute(
26        self,
27        state: &mut InterpreterState<Reg, ExtState, Memory, PC, InstructionHandler, CustomError>,
28    ) -> Result<ControlFlow<()>, ExecutionError<Reg::Type, CustomError>> {
29        Ok(ControlFlow::Continue(()))
30    }
31}