From 8c21a3da4a334d551f69a5e320a5ba4cd7dec6f4 Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 8 Dec 2023 00:06:50 +0000 Subject: deploy: 20744b382d4d0226037eab810f312accc28fbfe2 --- tiny_vm/enum.TinyInsn.html | 6 +++--- tiny_vm/enum.TinyReg.html | 6 +++--- tiny_vm/struct.PhysAddr.html | 4 ++-- tiny_vm/struct.TinyVm.html | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'tiny_vm') diff --git a/tiny_vm/enum.TinyInsn.html b/tiny_vm/enum.TinyInsn.html index 57b3487..b57d716 100644 --- a/tiny_vm/enum.TinyInsn.html +++ b/tiny_vm/enum.TinyInsn.html @@ -1,4 +1,4 @@ -TinyInsn in tiny_vm - Rust

Enum tiny_vm::TinyInsn

source ·
pub enum TinyInsn {
+TinyInsn in tiny_vm - Rust

Enum tiny_vm::TinyInsn

source ·
pub enum TinyInsn {
     Halt,
     LoadImm(TinyReg, u16),
     Load(TinyReg, u16),
@@ -16,9 +16,9 @@
 
§

Addi(TinyReg, i16)

Add the immediate to the register reg += imm.

§

Branch(usize)

Jump unconditional (absolute addressing) pc = disp.

§

BranchZero(TinyReg, usize)

Jump if the register is zero (absolute addressing) pc = (reg == 0) ? disp : pc++.

-

Trait Implementations§

source§

impl Clone for TinyInsn

source§

fn clone(&self) -> TinyInsn

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TinyInsn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<TinyInsn> for TinyInsn

source§

fn eq(&self, other: &TinyInsn) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for TinyInsn

source§

fn clone(&self) -> TinyInsn

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TinyInsn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<TinyInsn> for TinyInsn

source§

fn eq(&self, other: &TinyInsn) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for TinyInsn

source§

impl StructuralPartialEq for TinyInsn

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Copy for TinyInsn

source§

impl StructuralPartialEq for TinyInsn

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/tiny_vm/enum.TinyReg.html b/tiny_vm/enum.TinyReg.html index a5c9df9..52b2104 100644 --- a/tiny_vm/enum.TinyReg.html +++ b/tiny_vm/enum.TinyReg.html @@ -1,11 +1,11 @@ -TinyReg in tiny_vm - Rust

Enum tiny_vm::TinyReg

source ·
pub enum TinyReg {
+TinyReg in tiny_vm - Rust

Enum tiny_vm::TinyReg

source ·
pub enum TinyReg {
     A,
     B,
     C,
 }
Expand description

The registers for the TinyVm.

-

Variants§

Trait Implementations§

source§

impl Clone for TinyReg

source§

fn clone(&self) -> TinyReg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TinyReg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<TinyReg> for TinyReg

source§

fn eq(&self, other: &TinyReg) -> bool

This method tests for self and other values to be equal, and is used +

Variants§

Trait Implementations§

source§

impl Clone for TinyReg

source§

fn clone(&self) -> TinyReg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TinyReg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<TinyReg> for TinyReg

source§

fn eq(&self, other: &TinyReg) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for TinyReg

source§

impl StructuralPartialEq for TinyReg

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Copy for TinyReg

source§

impl StructuralPartialEq for TinyReg

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/tiny_vm/struct.PhysAddr.html b/tiny_vm/struct.PhysAddr.html index 6f09f30..574570b 100644 --- a/tiny_vm/struct.PhysAddr.html +++ b/tiny_vm/struct.PhysAddr.html @@ -1,5 +1,5 @@ -PhysAddr in tiny_vm - Rust

Struct tiny_vm::PhysAddr

source ·
pub struct PhysAddr(pub u16);
Expand description

A guest physical address.

-

Tuple Fields§

§0: u16

Trait Implementations§

source§

impl Into<usize> for PhysAddr

source§

fn into(self) -> usize

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +PhysAddr in tiny_vm - Rust

Struct tiny_vm::PhysAddr

source ·
pub struct PhysAddr(pub u16);
Expand description

A guest physical address.

+

Tuple Fields§

§0: u16

Trait Implementations§

source§

impl Into<usize> for PhysAddr

source§

fn into(self) -> usize

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/tiny_vm/struct.TinyVm.html b/tiny_vm/struct.TinyVm.html index 9932a6a..890ce75 100644 --- a/tiny_vm/struct.TinyVm.html +++ b/tiny_vm/struct.TinyVm.html @@ -1,12 +1,12 @@ -TinyVm in tiny_vm - Rust

Struct tiny_vm::TinyVm

source ·
pub struct TinyVm { /* private fields */ }
Expand description

The TinyVm virtual machine state.

-

Implementations§

source§

impl TinyVm

source

pub fn new(code: Vec<TinyInsn>) -> Self

Create a new TinyVm and initialize the instruction memory from code.

-
source

pub fn read_reg(&self, reg: TinyReg) -> u16

Read guest register.

-
source

pub fn write_reg(&mut self, reg: TinyReg, val: u16)

Write guest register.

-
source

pub fn read_mem(&self, paddr: PhysAddr) -> u16

Read guest data memory.

-
source

pub fn write_mem(&mut self, paddr: PhysAddr, val: u16)

Write guest data memory.

-
source

pub fn dump(&self)

Dump the VM state to stdout.

-
source

pub fn interp(&mut self)

Run in interpreter mode until the next TinyInsn::Halt instruction is hit.

-
source

pub fn jit(&mut self)

Run in JIT mode until the next TinyInsn::Halt instruction is hit. Translate guest +TinyVm in tiny_vm - Rust

Struct tiny_vm::TinyVm

source ·
pub struct TinyVm { /* private fields */ }
Expand description

The TinyVm virtual machine state.

+

Implementations§

source§

impl TinyVm

source

pub fn new(code: Vec<TinyInsn>) -> Self

Create a new TinyVm and initialize the instruction memory from code.

+
source

pub fn read_reg(&self, reg: TinyReg) -> u16

Read guest register.

+
source

pub fn write_reg(&mut self, reg: TinyReg, val: u16)

Write guest register.

+
source

pub fn read_mem(&self, paddr: PhysAddr) -> u16

Read guest data memory.

+
source

pub fn write_mem(&mut self, paddr: PhysAddr, val: u16)

Write guest data memory.

+
source

pub fn dump(&self)

Dump the VM state to stdout.

+
source

pub fn interp(&mut self)

Run in interpreter mode until the next TinyInsn::Halt instruction is hit.

+
source

pub fn jit(&mut self)

Run in JIT mode until the next TinyInsn::Halt instruction is hit. Translate guest basic blocks on demand.

Auto Trait Implementations§

§

impl RefUnwindSafe for TinyVm

§

impl !Send for TinyVm

§

impl !Sync for TinyVm

§

impl Unpin for TinyVm

§

impl UnwindSafe for TinyVm

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere -- cgit v1.2.3