#[repr(u8)]pub enum GPRKind {
Bit8High = 1,
Bit8 = 2,
Bit16 = 3,
Bit32 = 4,
Bit64 = 5,
}
Expand description
Represents the kind of a general purpose register.
Variants§
Bit8High = 1
Represents AH, BH, CH and DH registers.
Bit8 = 2
Represents AL, CL, DL, BL, SPL, BPL, SIL, DIL, R8B, R9B, R10B, R11B, R12B, R13B, R14B and R15B registers.
Bit16 = 3
Represents AX, CX, DX, BX, SP, BP, SI, DI, R8W, R9W, R10W, R11W, R12W, R13W, R14W and R15W registers.
Bit32 = 4
Represents EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, R8D, R9D, R10D, R11D, R12D, R13D, R14D and R15D registers.
Bit64 = 5
Represents RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, R8, R9, R10, R11, R12, R13, R14 and R15 registers.
Implementations§
Source§impl GPRKind
impl GPRKind
pub const fn as_u8(self) -> u8
Sourcepub const unsafe fn from_u8_unchecked(value: u8) -> Self
pub const unsafe fn from_u8_unchecked(value: u8) -> Self
Creates a new GPRKind
from a u8
index.
§Safety
The index must be in the range 1..=5
, otherwise the behavior is undefined.
Sourcepub const fn from_u8(value: u8) -> Option<Self>
pub const fn from_u8(value: u8) -> Option<Self>
Creates a new GPRKind
from a u8
index.
§Returns
Some(GPRKind)
if theu8
is in the range1..=5
None
if theu8
is 0 or greater than 5
pub const fn size(self) -> Size
Trait Implementations§
impl Copy for GPRKind
impl Eq for GPRKind
impl StructuralPartialEq for GPRKind
Auto Trait Implementations§
impl Freeze for GPRKind
impl RefUnwindSafe for GPRKind
impl Send for GPRKind
impl Sync for GPRKind
impl Unpin for GPRKind
impl UnwindSafe for GPRKind
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