pub struct ArmStack {
top: NonNull<u32>,
sp: StackPtr,
size: NonZero<usize>,
}Expand description
A stack on arm is 4 byte aligned and grows downwards.
Fields§
§top: NonNull<u32>The top of the stack (highest address).
Safety: NonNull
sp: StackPtrThe current offset from the top of the stack
size: NonZero<usize>The size of the stack
Implementations§
Source§impl ArmStack
impl ArmStack
fn does_fit(&self, size: usize) -> bool
fn is_call_aligned(sp: StackPtr) -> bool
fn in_bounds(&self, sp: *mut u32) -> Option<usize>
unsafe fn push(sp: &mut NonNull<u32>, value: u32)
fn push_irq_ret_fn( &mut self, f: extern "C" fn(), fin: Option<extern "C" fn() -> !>, ) -> Result<()>
Trait Implementations§
impl Copy for ArmStack
Auto Trait Implementations§
impl Freeze for ArmStack
impl RefUnwindSafe for ArmStack
impl !Send for ArmStack
impl !Sync for ArmStack
impl Unpin for ArmStack
impl UnwindSafe for ArmStack
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