pub enum Memory {
Based {
base: GPR,
offset: Offset,
},
Scaled {
index: GPR,
scale: Scale,
offset: Offset,
},
BasedScaled {
base: GPR,
index: GPR,
scale: Scale,
offset: Offset,
},
RelativeToRIP {
offset: Offset,
},
}
Expand description
Represents a memory operand.
§Safety
Not all combinations of are valid for a given instruction. For specifics refer to the Intel x86 manual.
In particular all the GPRs have to be 64-bit wide.
Variants§
Based
Represents a based memory operand, i.e. [base + offset]
.
Scaled
Represents a scaled memory operand, i.e. [index * scale + offset]
.
§Safety
index == GPR::RSP
is not allowed.
BasedScaled
Represents a based scaled memory operand, i.e. [base + index * scale + offset]
.
§Safety
index == GPR::RSP
is not allowed.
RelativeToRIP
Represents a RIP-relative memory operand, i.e. [RIP + offset]
.
Trait Implementations§
impl Eq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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