pub enum Reg<Type> {
Show 32 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,
A6 = 16,
A7 = 17,
S2 = 18,
S3 = 19,
S4 = 20,
S5 = 21,
S6 = 22,
S7 = 23,
S8 = 24,
S9 = 25,
S10 = 26,
S11 = 27,
T3 = 28,
T4 = 29,
T5 = 30,
T6 = 31,
// some variants omitted
}Expand description
RISC-V register for RV32I/RV64I.
Use Type = u32 for RV32I and Type = u64 for RV64I.
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
A6 = 16
Function argument: x16
A7 = 17
Function argument: x17
S2 = 18
Saved register: x18
S3 = 19
Saved register: x19
S4 = 20
Saved register: x20
S5 = 21
Saved register: x21
S6 = 22
Saved register: x22
S7 = 23
Saved register: x23
S8 = 24
Saved register: x24
S9 = 25
Saved register: x25
S10 = 26
Saved register: x26
S11 = 27
Saved register: x27
T3 = 28
Temporary: x28
T4 = 29
Temporary: x29
T5 = 30
Temporary: x30
T6 = 31
Temporary: x31
Trait Implementations§
impl<Type: Copy> Copy for Reg<Type>
impl<Type> Eq for Reg<Type>
Auto Trait Implementations§
impl<Type> Freeze for Reg<Type>
impl<Type> RefUnwindSafe for Reg<Type>where
Type: RefUnwindSafe,
impl<Type> Send for Reg<Type>where
Type: Send,
impl<Type> Sync for Reg<Type>where
Type: Sync,
impl<Type> Unpin for Reg<Type>where
Type: Unpin,
impl<Type> UnwindSafe for Reg<Type>where
Type: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more