pub enum Register {
Zero,
Ra,
Sp,
Gp,
Tp,
Temp(RegisterType, usize),
Saved(RegisterType, usize),
Arg(RegisterType, usize),
}Expand description
ABI name for RISC-V integer and floating-point register.
For more details: https://content.riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf (109p)
Variants§
Zero
Ra
Sp
Gp
Tp
Temp(RegisterType, usize)
E.g., t0
Saved(RegisterType, usize)
E.g., s0
Arg(RegisterType, usize)
E.g., a0
Implementations§
Source§impl Register
impl Register
pub const T0: Self
pub const T1: Self
pub const T2: Self
pub const T3: Self
pub const T4: Self
pub const T5: Self
pub const T6: Self
pub const S0: Self
pub const S1: Self
pub const S2: Self
pub const S3: Self
pub const S4: Self
pub const S5: Self
pub const S6: Self
pub const S7: Self
pub const S8: Self
pub const S9: Self
pub const S10: Self
pub const S11: Self
pub const A0: Self
pub const A1: Self
pub const A2: Self
pub const A3: Self
pub const A4: Self
pub const A5: Self
pub const A6: Self
pub const A7: Self
pub const FT0: Self
pub const FT1: Self
pub const FT2: Self
pub const FT3: Self
pub const FT4: Self
pub const FT5: Self
pub const FT6: Self
pub const FT7: Self
pub const FT8: Self
pub const FT9: Self
pub const FT10: Self
pub const FT11: Self
pub const FS0: Self
pub const FS1: Self
pub const FS2: Self
pub const FS3: Self
pub const FS4: Self
pub const FS5: Self
pub const FS6: Self
pub const FS7: Self
pub const FS8: Self
pub const FS9: Self
pub const FS10: Self
pub const FS11: Self
pub const FA0: Self
pub const FA1: Self
pub const FA2: Self
pub const FA3: Self
pub const FA4: Self
pub const FA5: Self
pub const FA6: Self
pub const FA7: Self
pub fn temp(register_type: RegisterType, id: usize) -> Self
pub fn saved(register_type: RegisterType, id: usize) -> Self
pub fn arg(register_type: RegisterType, id: usize) -> Self
Trait Implementations§
impl Copy for Register
impl Eq for Register
impl StructuralPartialEq for Register
Auto Trait Implementations§
impl Freeze for Register
impl RefUnwindSafe for Register
impl Send for Register
impl Sync for Register
impl Unpin for Register
impl UnwindSafe for Register
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more