#[repr(u8)]pub enum ContractRegister {
Show 30 variants
Zero = 0,
Ra = 1,
Sp = 2,
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 register type used by contracts.
gp and tp registers are excluded because they are not present in contracts.
Variants§
Zero = 0
Always zero: x0
Ra = 1
Return address: x1
Sp = 2
Stack pointer: x2
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§
Source§impl Clone for ContractRegister
impl Clone for ContractRegister
Source§fn clone(&self) -> ContractRegister
fn clone(&self) -> ContractRegister
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContractRegister
impl Debug for ContractRegister
Source§impl Default for ContractRegister
impl Default for ContractRegister
Source§impl Display for ContractRegister
impl Display for ContractRegister
Source§impl PartialEq for ContractRegister
impl PartialEq for ContractRegister
Source§impl Register for ContractRegister
impl Register for ContractRegister
Source§impl RegisterFile<ContractRegister> for ContractRegisters
impl RegisterFile<ContractRegister> for ContractRegisters
Source§fn read(&self, reg: ContractRegister) -> u64
fn read(&self, reg: ContractRegister) -> u64
Source§fn write(&mut self, reg: ContractRegister, value: u64)
fn write(&mut self, reg: ContractRegister, value: u64)
Source§impl ZcmpRegister for ContractRegister
SAFETY: Self::from_bits() returns Some() for 1, 8, 9 and 18..=27
impl ZcmpRegister for ContractRegister
SAFETY: Self::from_bits() returns Some() for 1, 8, 9 and 18..=27
impl Copy for ContractRegister
impl Eq for ContractRegister
Auto Trait Implementations§
impl Freeze for ContractRegister
impl RefUnwindSafe for ContractRegister
impl Send for ContractRegister
impl Sync for ContractRegister
impl Unpin for ContractRegister
impl UnsafeUnpin for ContractRegister
impl UnwindSafe for ContractRegister
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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