Struct rvsim::CpuState [−][src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for CpuState
[src]
Auto Trait Implementations
impl RefUnwindSafe for CpuState
impl Send for CpuState
impl Sync for CpuState
impl Unpin for CpuState
impl UnwindSafe for CpuState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,