pub struct ZcmpUrlist<Reg> { /* private fields */ }Expand description
Zcmp register list selector.
Only valid values (4..=15, further restricted to 4..=6 for RVE) are
representable; construct via ZcmpUrlist::try_from_raw.
Implementations§
Source§impl<Reg> ZcmpUrlist<Reg>where
Reg: ZcmpRegister,
impl<Reg> ZcmpUrlist<Reg>where
Reg: ZcmpRegister,
Sourcepub const fn try_from_raw(raw: u8) -> Option<Self>where
Reg: ZcmpRegister,
pub const fn try_from_raw(raw: u8) -> Option<Self>where
Reg: ZcmpRegister,
Create a validated ZcmpUrlist from a raw u8 value.
Returns None if raw is reserved (0..=3), out of range (>15), or
names a register list inaccessible under the current ISA variant
(e.g., urlist > 6 under RVE, where only ra, s0, s1 exist).
Sourcepub fn reg_list(self) -> impl Iterator<Item = Reg>
pub fn reg_list(self) -> impl Iterator<Item = Reg>
Iterator over the absolute register numbers in this list.
Order matches the spec push/pop order: ra first, then s0 ascending. ra=x1, s0=x8, s1=x9, s2=x18..s9=x25, s10=x26, s11=x27.
Note: urlist=15 is {ra, s0-s11} (13 registers, including s10); {ra, s0-s10} has no encoding.
Sourcepub const fn stack_adj_base(self) -> u32
pub const fn stack_adj_base(self) -> u32
Stack adjustment base in bytes.
The minimum stack frame size for this register list, rounded up to a 16-byte alignment. The
full stack adjustment is: stack_adj_base + spimm * 16.
Values sourced from the Zcmp spec Table 3.
Trait Implementations§
Source§impl<Reg: Clone> Clone for ZcmpUrlist<Reg>
impl<Reg: Clone> Clone for ZcmpUrlist<Reg>
Source§fn clone(&self) -> ZcmpUrlist<Reg>
fn clone(&self) -> ZcmpUrlist<Reg>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more