Struct cranelift_codegen::machinst::abi_impl::ABICallerImpl[][src]

pub struct ABICallerImpl<M: ABIMachineSpec> { /* fields omitted */ }
Expand description

ABI object for a callsite.

Implementations

impl<M: ABIMachineSpec> ABICallerImpl<M>[src]

pub fn from_func(
    sig: &Signature,
    extname: &ExternalName,
    dist: RelocDistance,
    caller_conv: CallConv,
    flags: &Flags
) -> CodegenResult<ABICallerImpl<M>>
[src]

Create a callsite ABI object for a call directly to the specified function.

pub fn from_ptr(
    sig: &Signature,
    ptr: Reg,
    opcode: Opcode,
    caller_conv: CallConv,
    flags: &Flags
) -> CodegenResult<ABICallerImpl<M>>
[src]

Create a callsite ABI object for a call to a function pointer with the given signature.

Trait Implementations

impl<M: ABIMachineSpec> ABICaller for ABICallerImpl<M>[src]

type I = M::I

The instruction type for the ISA associated with this ABI.

fn signature(&self) -> &Signature[src]

Access the (possibly legalized) signature.

fn num_args(&self) -> usize[src]

Get the number of arguments expected.

fn accumulate_outgoing_args_size<C: LowerCtx<I = Self::I>>(&self, ctx: &mut C)[src]

Accumulate outgoing arguments. This ensures that the caller (as identified via the CTX argument) allocates enough space in the prologue to hold all arguments and return values for this call. There is no code emitted at the call site, everything is done in the caller’s function prologue. Read more

fn emit_stack_pre_adjust<C: LowerCtx<I = Self::I>>(&self, ctx: &mut C)[src]

Emit code to pre-adjust the stack, prior to argument copies and call.

fn emit_stack_post_adjust<C: LowerCtx<I = Self::I>>(&self, ctx: &mut C)[src]

Emit code to post-adjust the satck, after call return and return-value copies.

fn emit_copy_regs_to_arg<C: LowerCtx<I = Self::I>>(
    &self,
    ctx: &mut C,
    idx: usize,
    from_regs: ValueRegs<Reg>
)
[src]

Emit a copy of an argument value from a source register, prior to the call.

fn get_copy_to_arg_order(&self) -> SmallVec<[usize; 8]>[src]

Specific order for copying into arguments at callsites. We must be careful to copy into StructArgs first, because we need to be able to invoke memcpy() before we’ve loaded other arg regs (see above). Read more

fn emit_copy_retval_to_regs<C: LowerCtx<I = Self::I>>(
    &self,
    ctx: &mut C,
    idx: usize,
    into_regs: ValueRegs<Writable<Reg>>
)
[src]

Emit a copy a return value into a destination register, after the call returns.

fn emit_call<C: LowerCtx<I = Self::I>>(&mut self, ctx: &mut C)[src]

Emit the call itself. Read more

Auto Trait Implementations

impl<M> RefUnwindSafe for ABICallerImpl<M> where
    M: RefUnwindSafe

impl<M> Send for ABICallerImpl<M> where
    M: Send

impl<M> Sync for ABICallerImpl<M> where
    M: Sync

impl<M> Unpin for ABICallerImpl<M> where
    M: Unpin

impl<M> UnwindSafe for ABICallerImpl<M> where
    M: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.