pub struct PhysReg {
pub id: u32,
pub name: String,
pub class: RegClass,
}Expand description
A physical register on the target architecture.
Fields§
§id: u32Unique numeric ID of this register.
name: StringHuman-readable name (e.g. “rax”, “f0”, “xmm3”).
class: RegClassThe register class.
Implementations§
Source§impl PhysReg
impl PhysReg
Sourcepub fn new(id: u32, name: impl Into<String>, class: RegClass) -> Self
pub fn new(id: u32, name: impl Into<String>, class: RegClass) -> Self
Create a new physical register.
Sourcepub fn integer_bank(n: u32) -> Vec<PhysReg>
pub fn integer_bank(n: u32) -> Vec<PhysReg>
Create a set of n integer physical registers named r0..r{n-1}.
Sourcepub fn float_bank(n: u32) -> Vec<PhysReg>
pub fn float_bank(n: u32) -> Vec<PhysReg>
Create a set of n float physical registers named f0..f{n-1}.
Trait Implementations§
impl Eq for PhysReg
impl StructuralPartialEq for PhysReg
Auto Trait Implementations§
impl Freeze for PhysReg
impl RefUnwindSafe for PhysReg
impl Send for PhysReg
impl Sync for PhysReg
impl Unpin for PhysReg
impl UnsafeUnpin for PhysReg
impl UnwindSafe for PhysReg
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