Enum cranelift_codegen::machinst::abi_impl::ABIArg[][src]

pub enum ABIArg {
    Reg {
        regs: ValueRegs<RealReg>,
        ty: Type,
        extension: ArgumentExtension,
        purpose: ArgumentPurpose,
    },
    Stack {
        offset: i64,
        ty: Type,
        extension: ArgumentExtension,
        purpose: ArgumentPurpose,
    },
    StructArg {
        offset: i64,
        size: u64,
        purpose: ArgumentPurpose,
    },
}

A location for an argument or return value.

Variants

Reg

In a real register (or set of registers).

Fields of Reg

regs: ValueRegs<RealReg>

Register(s) that hold this arg.

ty: Type

Value type of this arg.

extension: ArgumentExtension

Should this arg be zero- or sign-extended?

purpose: ArgumentPurpose

Purpose of this arg.

Stack

Arguments only: on stack, at given offset from SP at entry.

Fields of Stack

offset: i64

Offset of this arg relative to the base of stack args.

ty: Type

Value type of this arg.

extension: ArgumentExtension

Should this arg be zero- or sign-extended?

purpose: ArgumentPurpose

Purpose of this arg.

StructArg

Structure argument. We reserve stack space for it, but the CLIF-level semantics are a little weird: the value passed to the call instruction, and received in the corresponding block param, is a pointer. On the caller side, we memcpy the data from the passed-in pointer to the stack area; on the callee side, we compute a pointer to this stack area and provide that as the argument's value.

Fields of StructArg

offset: i64

Offset of this arg relative to base of stack args.

size: u64

Size of this arg on the stack.

purpose: ArgumentPurpose

Purpose of this arg.

Trait Implementations

impl Clone for ABIArg[src]

impl Copy for ABIArg[src]

impl Debug for ABIArg[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.