Struct rvsim::CpuState[][src]

pub struct CpuState {
    pub x: [u32; 32],
    pub f: [Sf64; 32],
    pub pc: u32,
    pub fcsr: u32,
    pub reservation: Option<u32>,
}

Struct containing all virtual CPU state.

With the serialize crate feature, this structure is serializable using Serde.

Fields

x: [u32; 32]

Integer registers.

f: [Sf64; 32]

Floating-point registers.

pc: u32

Program counter.

fcsr: u32

Floating-point CSR.

reservation: Option<u32>

Reservation slot for the atomic extension.

When modifying memory outside the interpreter, this should usually be cleared.

Implementations

impl CpuState[src]

pub fn new(pc: u32) -> Self[src]

Create a new state instance, with the given pc starting value.

All registers are initialized to zero.

Trait Implementations

impl Clone for CpuState[src]

impl Debug for CpuState[src]

impl<'de> Deserialize<'de> for CpuState[src]

impl Serialize for CpuState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.