pub struct Vm<Isa = Instr<ReservedOp>>where
Isa: InstructionSet,{ /* private fields */ }
Expand description
Alu virtual machine providing single-core execution environment
Implementations§
source§impl<Isa> Vm<Isa>where
Isa: InstructionSet,
impl<Isa> Vm<Isa>where
Isa: InstructionSet,
sourcepub fn registers(&self) -> &Box<CoreRegs>
pub fn registers(&self) -> &Box<CoreRegs>
Method borrowing Vm::registers
field.
A set of registers
sourcepub fn phantom(&self) -> &PhantomData<Isa>
pub fn phantom(&self) -> &PhantomData<Isa>
Method borrowing Vm::phantom
field.
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: &Program<Isa>) -> bool
pub fn run(&mut self, program: &Program<Isa>) -> 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.