pub struct Mem {
pub base: Option<Operand>,
pub index: Option<Operand>,
pub scale: u8,
pub disp: i32,
pub symbol: Option<Symbol>,
}Expand description
A memory addressing mode as a caller writes one down.
The difference from Amode is that the registers are here rather than in the operand
vector, which is what crate::InstBuilder::mem fixes. Keeping the two apart is what lets
the operand indices in an Amode be an invariant of the builder rather than something
every caller has to get right.
Fields§
§base: Option<Operand>The base register, which the instruction reads.
index: Option<Operand>The index register, which the instruction reads.
scale: u8What the index is multiplied by.
disp: i32The constant added to the address.
symbol: Option<Symbol>The symbol the address is relative to.
Implementations§
Trait Implementations§
impl Copy for Mem
impl Eq for Mem
impl StructuralPartialEq for Mem
Auto Trait Implementations§
impl Freeze for Mem
impl RefUnwindSafe for Mem
impl Send for Mem
impl Sync for Mem
impl Unpin for Mem
impl UnsafeUnpin for Mem
impl UnwindSafe for Mem
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