pub struct OpReg {
pub kind: OpRegType,
pub size: u32,
pub index: usize,
pub count: u32,
pub is_high8: bool,
pub is_block: bool,
}
Expand description
Describes a register operand.
Fields§
§kind: OpRegType
The type of the register.
size: u32
Indicates the register size, in bytes.
This may not be equal to the Operand::size
field, as a smaller amount of data may be processed from a
register (especially if we have a SSE register or a mask register).
index: usize
The register index/ID.
Registers are numbered as they are in the Intel documentation. Examples:
AL
=AX
=EAX
=RAX
= 0R15B
=R15W
=R15D
=R15
= 15XMM0
= 0ZMM31
= 31ES
= 0CS
= 1
§Remarks
If kind is OpRegType::Gpr
, the high and low part of 16-bit registers will have
the same index (for example, AH
and AL
). To differentiate between them use is_high8.
count: u32
The number of registers accessed, starting with id.
is_high8: bool
true
if this is the high part of a 16-bit GPR: AH
, CH
, DH
, or BH
.
is_block: bool
true
if this is a block register addressing.
Trait Implementations§
source§impl PartialEq for OpReg
impl PartialEq for OpReg
impl Copy for OpReg
impl Eq for OpReg
impl StructuralPartialEq for OpReg
Auto Trait Implementations§
impl RefUnwindSafe for OpReg
impl Send for OpReg
impl Sync for OpReg
impl Unpin for OpReg
impl UnwindSafe for OpReg
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