pub struct RegInfo {
pub banks: &'static [RegBank],
pub classes: &'static [RegClass],
}
Expand description
Information about the registers in an ISA.
The RegUnit
data structure collects all relevant static information about the registers in an
ISA.
Fields
banks: &'static [RegBank]
All register banks, ordered by their first_unit
. The register banks are disjoint, but
there may be holes of unused register unit numbers between banks due to alignment.
classes: &'static [RegClass]
All register classes ordered topologically so a sub-class always follows its parent.
Implementations
sourceimpl RegInfo
impl RegInfo
sourcepub fn bank_containing_regunit(&self, regunit: RegUnit) -> Option<&RegBank>
pub fn bank_containing_regunit(&self, regunit: RegUnit) -> Option<&RegBank>
Get the register bank holding regunit
.
sourcepub fn parse_regunit(&self, name: &str) -> Option<RegUnit>
pub fn parse_regunit(&self, name: &str) -> Option<RegUnit>
Try to parse a regunit name. The name is not expected to begin with %
.
sourcepub fn display_regunit(&self, regunit: RegUnit) -> DisplayRegUnit<'_>
pub fn display_regunit(&self, regunit: RegUnit) -> DisplayRegUnit<'_>
Make a temporary object that can display a register unit.
sourcepub fn rc(&self, idx: RegClassIndex) -> RegClass
pub fn rc(&self, idx: RegClassIndex) -> RegClass
Get the register class corresponding to idx
.
sourcepub fn toprc(&self, idx: RegClassIndex) -> RegClass
pub fn toprc(&self, idx: RegClassIndex) -> RegClass
Get the top-level register class containing the idx
class.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RegInfo
impl Send for RegInfo
impl Sync for RegInfo
impl Unpin for RegInfo
impl UnwindSafe for RegInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more