pub struct Vm<Isa = Instr<ReservedOp>>where
Isa: InstructionSet,{
pub registers: Box<CoreRegs>,
/* private fields */
}
Expand description
Alu virtual machine providing single-core execution environment
Fields§
§registers: Box<CoreRegs>
A set of registers
Implementations§
source§impl<Isa> Vm<Isa>where
Isa: InstructionSet,
impl<Isa> Vm<Isa>where Isa: InstructionSet,
Runtime for program execution.
sourcepub fn run(
&mut self,
program: &impl Program<Isa = Isa>,
context: &Isa::Context<'_>
) -> bool
pub fn run( &mut self, program: &impl Program<Isa = Isa>, context: &Isa::Context<'_> ) -> bool
Executes the program starting from the provided entry point (set with
[Program::set_entrypoint
] and [Program::with
], or initialized to 0 offset of the
first used library if [Program::new
] was used).
Returns
Value of the st0
register at the end of the program execution.
Trait Implementations§
Auto Trait Implementations§
impl<Isa> RefUnwindSafe for Vm<Isa>where Isa: RefUnwindSafe,
impl<Isa> Send for Vm<Isa>where Isa: Send,
impl<Isa> Sync for Vm<Isa>where Isa: Sync,
impl<Isa> Unpin for Vm<Isa>where Isa: Unpin,
impl<Isa> UnwindSafe for Vm<Isa>where Isa: UnwindSafe,
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