Struct cranelift_codegen::isa::StackRef
source · [−]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: StackBase
The base register to use for addressing.
offset: StackOffset
Immediate offset from the base register to the first byte of the stack slot.
Implementations
sourceimpl StackRef
impl StackRef
sourcepub fn masked(
ss: StackSlot,
mask: StackBaseMask,
frame: &StackSlots
) -> Option<Self>
pub fn masked(
ss: StackSlot,
mask: StackBaseMask,
frame: &StackSlots
) -> Option<Self>
Get a reference to the stack slot ss
using one of the base pointers in mask
.
sourcepub fn sp(ss: StackSlot, frame: &StackSlots) -> Self
pub fn sp(ss: StackSlot, frame: &StackSlots) -> Self
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more