pub struct Amode {
pub base: Option<u8>,
pub index: Option<u8>,
pub scale: u8,
pub disp: i32,
pub symbol: Option<Symbol>,
pub got: bool,
pub segment: Option<Segment>,
}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.
got: boolWhether the address is read out of the global offset table rather than worked out from the
instruction pointer. See Mem::got.
segment: Option<Segment>Which storage the address is counted from, when it is not the flat one. See Segment.