Struct cranelift_codegen::isa::StackRef [−][src]
pub struct StackRef {
pub base: StackBase,
pub offset: StackOffset,
}Expand description
A method for referencing a stack slot in the current stack frame.
Stack slots are addressed with a constant offset from a base register. The base can be the stack pointer, the frame pointer, or (in the future) a zone register pointing to an inner zone of a large stack frame.
Fields
base: StackBaseThe base register to use for addressing.
offset: StackOffsetImmediate offset from the base register to the first byte of the stack slot.
Implementations
impl StackRef[src]
impl StackRef[src]pub fn masked(
ss: StackSlot,
mask: StackBaseMask,
frame: &StackSlots
) -> Option<Self>[src]
pub fn masked(
ss: StackSlot,
mask: StackBaseMask,
frame: &StackSlots
) -> Option<Self>[src]Get a reference to the stack slot ss using one of the base pointers in mask.
pub fn sp(ss: StackSlot, frame: &StackSlots) -> Self[src]
pub fn sp(ss: StackSlot, frame: &StackSlots) -> Self[src]Get a reference to ss using the stack pointer as a base.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StackRef
impl Send for StackRef
impl Sync for StackRef
impl Unpin for StackRef
impl UnwindSafe for StackRef
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more