pub struct Reg(/* private fields */);
Expand description
A register named in an instruction. This register can be either a
virtual register or a fixed physical register. It does not have
any constraints applied to it: those can be added later in
MachInst::get_operands()
when the Reg
s are converted to
Operand
s.
Implementations§
Source§impl Reg
impl Reg
Sourcepub fn to_real_reg(self) -> Option<RealReg>
pub fn to_real_reg(self) -> Option<RealReg>
Get the physical register (RealReg
), if this register is
one.
Sourcepub fn to_virtual_reg(self) -> Option<VirtualReg>
pub fn to_virtual_reg(self) -> Option<VirtualReg>
Get the virtual (non-physical) register, if this register is one.
Sourcepub fn is_virtual(self) -> bool
pub fn is_virtual(self) -> bool
Is this a virtual reg?
Trait Implementations§
Source§impl AsMut<Reg> for Gpr
Available on crate feature x86
only.If you know what you’re doing, you can explicitly mutably borrow the
underlying Reg
. Don’t make it point to the wrong type of register
please.
impl AsMut<Reg> for Gpr
Available on crate feature
x86
only.If you know what you’re doing, you can explicitly mutably borrow the
underlying Reg
. Don’t make it point to the wrong type of register
please.
Source§impl AsMut<Reg> for Xmm
Available on crate feature x86
only.If you know what you’re doing, you can explicitly mutably borrow the
underlying Reg
. Don’t make it point to the wrong type of register
please.
impl AsMut<Reg> for Xmm
Available on crate feature
x86
only.If you know what you’re doing, you can explicitly mutably borrow the
underlying Reg
. Don’t make it point to the wrong type of register
please.
Source§impl Ord for Reg
impl Ord for Reg
Source§impl PartialOrd for Reg
impl PartialOrd for Reg
impl Copy for Reg
impl Eq for Reg
impl StructuralPartialEq for Reg
Auto Trait Implementations§
impl Freeze for Reg
impl RefUnwindSafe for Reg
impl Send for Reg
impl Sync for Reg
impl Unpin for Reg
impl UnwindSafe for Reg
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.