pub struct Gpr<R: AsReg = u8>(/* private fields */);
Expand description
A general purpose x64 register (e.g., %rax
).
This container wraps true register type R
to allow users to specify their
own; by default this will use u8
.
Implementations§
Source§impl<R: AsReg> Gpr<R>
impl<R: AsReg> Gpr<R>
Sourcepub fn new(reg: R) -> Self
pub fn new(reg: R) -> Self
Create a Gpr
that may be real (immediately emit-able in machine
code) or virtual (waiting for register allocation).
Trait Implementations§
impl<R: Copy + AsReg> Copy for Gpr<R>
Auto Trait Implementations§
impl<R> Freeze for Gpr<R>where
R: Freeze,
impl<R> RefUnwindSafe for Gpr<R>where
R: RefUnwindSafe,
impl<R> Send for Gpr<R>where
R: Send,
impl<R> Sync for Gpr<R>where
R: Sync,
impl<R> Unpin for Gpr<R>where
R: Unpin,
impl<R> UnwindSafe for Gpr<R>where
R: UnwindSafe,
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