pub struct Amode {
pub base: Option<u8>,
pub index: Option<u8>,
pub scale: u8,
pub disp: i32,
pub symbol: Option<Symbol>,
}Expand description
A memory addressing mode, as the instruction holds it.
The registers are the indices of the operands holding them rather than the registers
themselves, because an address register is a register the allocator has to see and rewrite,
and the only thing it looks at is the operand vector. Mem is the same thing written the
way a caller writes it, and crate::InstBuilder::mem turns one into the other.
Fields§
§base: Option<u8>The operand holding the base register.
index: Option<u8>The operand holding the index register.
scale: u8What the index is multiplied by, which is 1 when there is no index.
disp: i32The constant added to the address.
symbol: Option<Symbol>The symbol the address is relative to, for an access to a global.
Implementations§
Trait Implementations§
impl Copy for Amode
impl Eq for Amode
impl StructuralPartialEq for Amode
Auto Trait Implementations§
impl Freeze for Amode
impl RefUnwindSafe for Amode
impl Send for Amode
impl Sync for Amode
impl Unpin for Amode
impl UnsafeUnpin for Amode
impl UnwindSafe for Amode
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