Enum cranelift_codegen::ir::ArgumentExtension[][src]

pub enum ArgumentExtension {
    None,
    Uext,
    Sext,
}

Function argument extension options.

On some architectures, small integer function arguments and/or return values are extended to the width of a general-purpose register.

This attribute specifies how an argument or return value should be extended if the platform and ABI require it. Because the frontend (CLIF generator) does not know anything about the particulars of the target’s ABI, and the CLIF should be platform-independent, these attributes specify how to extend (according to the signedness of the original program) rather than whether to extend.

For example, on x86-64, the SystemV ABI does not require extensions of narrow values, so these ArgumentExtension attributes are ignored; but in the Baldrdash (SpiderMonkey) ABI on the same platform, all narrow values are extended, so these attributes may lead to extra zero/sign-extend instructions in the generated machine code.

Variants

None

No extension, high bits are indeterminate.

Uext

Unsigned extension: high bits in register are 0.

Sext

Signed extension: high bits in register replicate sign bit.

Trait Implementations

impl Clone for ArgumentExtension[src]

impl Copy for ArgumentExtension[src]

impl Debug for ArgumentExtension[src]

impl<'de> Deserialize<'de> for ArgumentExtension[src]

impl Eq for ArgumentExtension[src]

impl Hash for ArgumentExtension[src]

impl PartialEq<ArgumentExtension> for ArgumentExtension[src]

impl Serialize for ArgumentExtension[src]

impl StructuralEq for ArgumentExtension[src]

impl StructuralPartialEq for ArgumentExtension[src]

Auto Trait Implementations

impl RefUnwindSafe for ArgumentExtension

impl Send for ArgumentExtension

impl Sync for ArgumentExtension

impl Unpin for ArgumentExtension

impl UnwindSafe for ArgumentExtension

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> CallHasher for T where
    T: Hash
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.