pub struct PReg(/* private fields */);Expand description
A physical register: an index into the target’s register file.
What the number means (its name, hardware encoding, and class) is the
target’s business; see Target::reg. The
x86-64 target names its registers as constants, such as
x86_64::RAX.
§Examples
use backend_lang::x86_64::{self, RAX, RDI};
assert_eq!(x86_64::TARGET.reg(RAX).name(), "rax");
assert!(RAX.index() < RDI.index());Implementations§
Trait Implementations§
impl Copy for PReg
impl Eq for PReg
Source§impl FromIterator<PReg> for RegSet
impl FromIterator<PReg> for RegSet
Source§impl Ord for PReg
impl Ord for PReg
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for PReg
impl PartialOrd for PReg
impl StructuralPartialEq for PReg
Auto Trait Implementations§
impl Freeze for PReg
impl RefUnwindSafe for PReg
impl Send for PReg
impl Sync for PReg
impl Unpin for PReg
impl UnsafeUnpin for PReg
impl UnwindSafe for PReg
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