#[repr(u8)]pub enum Reg {
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,
}Expand description
A RISC-V Register
Variants§
ZERO = 0
SPECIAL: Always 0
RA = 1
Return address
SP = 2
SPECIAL: Stack pointer
GP = 3
Global pointer
TP = 4
Thread pointer
T0 = 5
Temporary
T1 = 6
Temporary
T2 = 7
Temporary
S0 = 8
Saved (Frame Pointer)
S1 = 9
Saved
A0 = 10
Function arguments / Return values
A1 = 11
Function arguments / Return values
A2 = 12
Function arguments
A3 = 13
Function arguments
A4 = 14
Function arguments
A5 = 15
Function arguments
A6 = 16
Function arguments
A7 = 17
Function arguments
S2 = 18
Saved
S3 = 19
Saved
S4 = 20
Saved
S5 = 21
Saved
S6 = 22
Saved
S7 = 23
Saved
S8 = 24
Saved
S9 = 25
Saved
S10 = 26
Saved
S11 = 27
Saved
T3 = 28
Temporary
T4 = 29
Temporary
T5 = 30
Temporary
T6 = 31
Temporary
Trait Implementations§
impl Copy for Reg
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 UnwindSafe for Reg
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