pub struct GPR { /* private fields */ }
Expand description
Represents general purpose registers.
Internally stored as a non-zero u8
value.
Implementations§
Source§impl GPR
impl GPR
pub const RAX: Self
pub const RCX: Self
pub const RDX: Self
pub const RBX: Self
pub const RSP: Self
pub const RBP: Self
pub const RSI: Self
pub const RDI: Self
pub const R8: Self
pub const R9: Self
pub const R10: Self
pub const R11: Self
pub const R12: Self
pub const R13: Self
pub const R14: Self
pub const R15: Self
pub const EAX: Self
pub const ECX: Self
pub const EDX: Self
pub const EBX: Self
pub const ESP: Self
pub const EBP: Self
pub const ESI: Self
pub const EDI: Self
pub const R8D: Self
pub const R9D: Self
pub const R10D: Self
pub const R11D: Self
pub const R12D: Self
pub const R13D: Self
pub const R14D: Self
pub const R15D: Self
pub const AX: Self
pub const CX: Self
pub const DX: Self
pub const BX: Self
pub const SP: Self
pub const BP: Self
pub const SI: Self
pub const DI: Self
pub const R8W: Self
pub const R9W: Self
pub const R10W: Self
pub const R11W: Self
pub const R12W: Self
pub const R13W: Self
pub const R14W: Self
pub const R15W: Self
pub const AL: Self
pub const CL: Self
pub const DL: Self
pub const BL: Self
pub const SPL: Self
pub const BPL: Self
pub const SIL: Self
pub const DIL: Self
pub const R8B: Self
pub const R9B: Self
pub const R10B: Self
pub const R11B: Self
pub const R12B: Self
pub const R13B: Self
pub const R14B: Self
pub const R15B: Self
pub const AH: Self
pub const CH: Self
pub const DH: Self
pub const BH: Self
Sourcepub const unsafe fn new_unchecked(kind: GPRKind, index: u8) -> Self
pub const unsafe fn new_unchecked(kind: GPRKind, index: u8) -> Self
Creates a new GPR
from a GPRKind
and an index
.
§Safety
If kind
is Bit8High
, then index
must be in the range 4..=7
.
These represent AH, CH, DH and BH registers. All other combinations
are valid.
Sourcepub const fn new(kind: GPRKind, index: u8) -> Result<Self, NewGPRError>
pub const fn new(kind: GPRKind, index: u8) -> Result<Self, NewGPRError>
Creates a new GPR
from a GPRKind
and an index
.
§Returns
Ok(GPR)
if theGPRKind
andindex
are validErr(NewGPRError)
if thekind
isGPRKind::Bit8High
andindex
is outside the4..=7
range
pub const fn kind(self) -> GPRKind
pub const fn size(self) -> Size
pub const fn equals(&self, other: &Self) -> bool
Trait Implementations§
impl Copy for GPR
impl Eq for GPR
impl StructuralPartialEq for GPR
Auto Trait Implementations§
impl Freeze for GPR
impl RefUnwindSafe for GPR
impl Send for GPR
impl Sync for GPR
impl Unpin for GPR
impl UnwindSafe for GPR
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