GenericInstructionHandler

Trait GenericInstructionHandler 

Source
pub trait GenericInstructionHandler<Instruction, Memory, CustomError>
where Instruction: GenericBaseInstruction, [(); <Instruction::Reg>::N]:, CustomError: Display,
{ // Required method fn fetch_instruction( &mut self, _regs: &mut Registers<Instruction::Reg>, memory: &mut Memory, pc: &mut u64, ) -> Result<FetchInstructionResult<Instruction>, ExecuteError<Instruction, CustomError>>; }
Expand description

Custom handlers for instructions ecall and ebreak

Required Methods§

Source

fn fetch_instruction( &mut self, _regs: &mut Registers<Instruction::Reg>, memory: &mut Memory, pc: &mut u64, ) -> Result<FetchInstructionResult<Instruction>, ExecuteError<Instruction, CustomError>>

Fetch a single instruction at a specified address and advance the program counter

Implementors§

Source§

impl<const RETURN_TRAP_ADDRESS: u64, Instruction, Memory> GenericInstructionHandler<Instruction, Memory, &'static str> for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
where Instruction: GenericBaseInstruction, [(); <Instruction::Reg>::N]:, Memory: VirtualMemory,