pub struct Mem {
pub base: Option<Gpr>,
pub index: Option<(Gpr, u8)>,
pub disp: Disp,
}Expand description
Holds a resolved machine address: disp(base, index, scale).
Every backend lowers this. RISC backends synthesize the index/scale part
with the expansion scratch registers.
Fields§
§base: Option<Gpr>Holds the base register. None selects the absolute ([disp]) form:
x86-64 encodes it directly, AArch64 and RISC-V 64 materialize the
address into a scratch register.
index: Option<(Gpr, u8)>Holds the index register and scale, when present.
disp: DispHolds the displacement.
Implementations§
Trait Implementations§
impl Copy for Mem
impl Eq for Mem
impl StructuralPartialEq for Mem
Auto Trait Implementations§
impl Forget for Mem
impl Freeze for Mem
impl Move 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