Skip to main content

Reg

Struct Reg 

Source
pub struct Reg(pub u8);
Expand description

A decoded RISC-V integer register.

Tuple Fields§

§0: u8

Implementations§

Source§

impl Reg

Source

pub const ZERO: Reg

The zero register zero (x0)

Source

pub const RA: Reg

The return address register ra (x1)

Source

pub const SP: Reg

The stack pointer register sp (x2)

Source

pub const GP: Reg

The global pointer register gp (x3)

Source

pub const TP: Reg

The thread pointer register tp (x4)

Source

pub const S0: Reg

Saved register s0 (x8)

Source

pub const FP: Reg

Saved register frame pointer fp (s0, x8)

Source

pub const S1: Reg

Saved register s1 (x9)

Source

pub const S2: Reg

Saved register s2 (x18)

Source

pub const S3: Reg

Saved register s3 (x19)

Source

pub const S4: Reg

Saved register s4 (x20)

Source

pub const S5: Reg

Saved register s5 (x21)

Source

pub const S6: Reg

Saved register s6 (x22)

Source

pub const S7: Reg

Saved register s7 (x23)

Source

pub const S8: Reg

Saved register s8 (x24)

Source

pub const S9: Reg

Saved register s9 (x25)

Source

pub const S10: Reg

Saved register s10 (x26)

Source

pub const S11: Reg

Saved register s11 (x27)

Source

pub const A0: Reg

Argument/return value register a0 (x10)

Source

pub const A1: Reg

Argument/return value register a1 (x11)

Source

pub const A2: Reg

Argument register a2 (x12)

Source

pub const A3: Reg

Argument register a3 (x13)

Source

pub const A4: Reg

Argument register a4 (x14)

Source

pub const A5: Reg

Argument register a5 (x15)

Source

pub const A6: Reg

Argument register a6 (x16)

Source

pub const A7: Reg

Argument register a7 (x17)

Source

pub const T0: Reg

Temporary register t0 (x5)

Source

pub const T1: Reg

Temporary register t1 (x6)

Source

pub const T2: Reg

Temporary register t2 (x7)

Source

pub const T3: Reg

Temporary register t3 (x28)

Source

pub const T4: Reg

Temporary register t4 (x29)

Source

pub const T5: Reg

Temporary register t5 (x30)

Source

pub const T6: Reg

Temporary register t6 (x31)

Trait Implementations§

Source§

impl Clone for Reg

Source§

fn clone(&self) -> Reg

Returns a duplicate 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 Reg

Source§

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

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

impl Display for Reg

Source§

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

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

impl Hash for Reg

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Reg

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Reg

Source§

impl Eq for Reg

Source§

impl StructuralPartialEq for Reg

Auto Trait Implementations§

§

impl Freeze for Reg

§

impl RefUnwindSafe for Reg

§

impl Send for Reg

§

impl Sync for Reg

§

impl Unpin for Reg

§

impl UnsafeUnpin for Reg

§

impl UnwindSafe for Reg

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.