EReg

Enum EReg 

Source
pub enum EReg<Type> {
Show 16 variants Zero = 0, Ra = 1, Sp = 2, Gp = 3, Tp = 4, T0 = 5, T1 = 6, T2 = 7, S0 = 8, S1 = 9, A0 = 10, A1 = 11, A2 = 12, A3 = 13, A4 = 14, A5 = 15, // some variants omitted
}
Expand description

RISC-V register for RV32E/RV64E.

Use Type = u32 for RV32E and Type = u64 for RV64E.

Variants§

§

Zero = 0

Always zero: x0

§

Ra = 1

Return address: x1

§

Sp = 2

Stack pointer: x2

§

Gp = 3

Global pointer: x3

§

Tp = 4

Thread pointer: x4

§

T0 = 5

Temporary/alternate return address: x5

§

T1 = 6

Temporary: x6

§

T2 = 7

Temporary: x7

§

S0 = 8

Saved register/frame pointer: x8

§

S1 = 9

Saved register: x9

§

A0 = 10

Function argument/return value: x10

§

A1 = 11

Function argument/return value: x11

§

A2 = 12

Function argument: x12

§

A3 = 13

Function argument: x13

§

A4 = 14

Function argument: x14

§

A5 = 15

Function argument: x15

Trait Implementations§

Source§

impl<Type: Clone> Clone for EReg<Type>

Source§

fn clone(&self) -> EReg<Type>

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<Type> Debug for EReg<Type>

Source§

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

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

impl<Type> Display for EReg<Type>

Source§

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

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

impl<Type> From<EReg<u64>> for Reg<Type>

Source§

fn from(reg: EReg<u64>) -> Self

Converts to this type from the input type.
Source§

impl<Type> PartialEq for EReg<Type>

Source§

fn eq(&self, other: &Self) -> 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 Register for EReg<u32>

Source§

const N: usize = 16usize

The number of general purpose registers. Read more
Source§

type Type = u32

Register type. Read more
Source§

fn from_bits(bits: u8) -> Option<Self>

Create a register from its bit representation
Source§

impl Register for EReg<u64>

Source§

const N: usize = 16usize

The number of general purpose registers. Read more
Source§

type Type = u64

Register type. Read more
Source§

fn from_bits(bits: u8) -> Option<Self>

Create a register from its bit representation
Source§

impl<Type: Copy> Copy for EReg<Type>

Source§

impl<Type> Eq for EReg<Type>

Auto Trait Implementations§

§

impl<Type> Freeze for EReg<Type>

§

impl<Type> RefUnwindSafe for EReg<Type>
where Type: RefUnwindSafe,

§

impl<Type> Send for EReg<Type>
where Type: Send,

§

impl<Type> Sync for EReg<Type>
where Type: Sync,

§

impl<Type> Unpin for EReg<Type>
where Type: Unpin,

§

impl<Type> UnwindSafe for EReg<Type>
where Type: UnwindSafe,

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.