Skip to main content

Ppc64Frame

Struct Ppc64Frame 

Source
pub struct Ppc64Frame;

Implementations§

Source§

impl Ppc64Frame

Source

pub fn aligned_frame_size(local_bytes: usize) -> usize

Total stack frame size (linkage + locals), 16-byte aligned.

Source

pub fn calculate_stack_offset(slot: usize) -> i32

Calculate the stack offset for local slot n (0-based).

Slots start above the linkage area and grow upward in address (i.e., at higher positive offsets from the old sp stored as back-chain). In the prologue we subtract frame_size from r1, so slot n is at LOCALS_BASE + n*8 from the new r1.

Source

pub fn generate_prologue<W: Write>( writer: &mut W, local_bytes: usize, ) -> Result<()>

Emit the function prologue.

Saves LR, creates the stack frame, stores callee-saved r14-r31 if needed (we don’t track that here, so we just save LR and update the back-chain).

Source

pub fn generate_epilogue<W: Write>( writer: &mut W, local_bytes: usize, ) -> Result<()>

Emit the function epilogue and return.

Source

pub fn generate_tail_epilogue<W: Write>( writer: &mut W, local_bytes: usize, ) -> Result<()>

Deallocate the frame and restore LR, then the caller must branch to the tail target (no blr — that would return to this function instead of tail-calling).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.