pub struct BasicInstructionHandler<const RETURN_TRAP_ADDRESS: u64>;Expand description
Basic instruction handler implementation.
RETURN_TRAP_ADDRESS is the address at which the interpreter will stop execution (gracefully).
Trait Implementations§
Source§impl<const RETURN_TRAP_ADDRESS: u64> Clone for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Clone for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Source§fn clone(&self) -> BasicInstructionHandler<RETURN_TRAP_ADDRESS>
fn clone(&self) -> BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const RETURN_TRAP_ADDRESS: u64> Debug for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Debug for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Source§impl<const RETURN_TRAP_ADDRESS: u64> Default for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Default for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Source§fn default() -> BasicInstructionHandler<RETURN_TRAP_ADDRESS>
fn default() -> BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Returns the “default value” for a type. Read more
Source§impl<const RETURN_TRAP_ADDRESS: u64, Instruction, Memory> GenericInstructionHandler<Instruction, Memory, &'static str> for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64, Instruction, Memory> GenericInstructionHandler<Instruction, Memory, &'static str> for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Source§fn fetch_instruction(
&mut self,
_regs: &mut Registers<Instruction::Reg>,
memory: &mut Memory,
pc: &mut u64,
) -> Result<FetchInstructionResult<Instruction>, ExecuteError<Instruction, &'static str>>
fn fetch_instruction( &mut self, _regs: &mut Registers<Instruction::Reg>, memory: &mut Memory, pc: &mut u64, ) -> Result<FetchInstructionResult<Instruction>, ExecuteError<Instruction, &'static str>>
Fetch a single instruction at a specified address and advance the program counter
Source§impl<const RETURN_TRAP_ADDRESS: u64, Reg, Memory> Rv64SystemInstructionHandler<Reg, Memory, &'static str> for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64, Reg, Memory> Rv64SystemInstructionHandler<Reg, Memory, &'static str> for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Source§fn handle_ecall(
&mut self,
_regs: &mut Registers<Reg>,
_memory: &mut Memory,
pc: &mut u64,
instruction: Rv64Instruction<Reg>,
) -> Result<(), ExecuteError<Rv64Instruction<Reg>, &'static str>>
fn handle_ecall( &mut self, _regs: &mut Registers<Reg>, _memory: &mut Memory, pc: &mut u64, instruction: Rv64Instruction<Reg>, ) -> Result<(), ExecuteError<Rv64Instruction<Reg>, &'static str>>
Handle an
ecall instruction. Read moreSource§fn handle_ebreak(
&mut self,
_regs: &mut Registers<Reg>,
_memory: &mut Memory,
_pc: &mut u64,
_instruction: Rv64Instruction<Reg>,
) -> Result<(), ExecuteError<Rv64Instruction<Reg>, CustomError>>
fn handle_ebreak( &mut self, _regs: &mut Registers<Reg>, _memory: &mut Memory, _pc: &mut u64, _instruction: Rv64Instruction<Reg>, ) -> Result<(), ExecuteError<Rv64Instruction<Reg>, CustomError>>
Handle an
ebreak instruction. Read moreimpl<const RETURN_TRAP_ADDRESS: u64> Copy for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Auto Trait Implementations§
impl<const RETURN_TRAP_ADDRESS: u64> Freeze for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> RefUnwindSafe for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Send for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Sync for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> Unpin for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
impl<const RETURN_TRAP_ADDRESS: u64> UnwindSafe for BasicInstructionHandler<RETURN_TRAP_ADDRESS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more