pub struct Operand {
pub location: Location,
pub mutability: Mutability,
pub extension: Extension,
pub align: bool,
}
Expand description
An x64 operand.
This is designed to look and feel like the operands as expressed in Intel’s Instruction Set Reference.
assert_eq!(r(r8).to_string(), "r8");
assert_eq!(rw(rm16).to_string(), "rm16[rw]");
assert_eq!(sxq(imm32).to_string(), "imm32[sxq]");
assert_eq!(align(xmm_m128).to_string(), "xmm_m128[align]");
Fields§
§location: Location
The location of the data: memory, register, immediate.
mutability: Mutability
An operand can be read-only or read-write.
extension: Extension
Some operands are sign- or zero-extended.
align: bool
Some memory operands require alignment; true
indicates that the memory
address used in the operand must align to the size of the operand (e.g.,
m128
must be 16-byte aligned).
Implementations§
Trait Implementations§
impl Copy for Operand
Auto Trait Implementations§
impl Freeze for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnwindSafe for Operand
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