[][src]Struct cranelift_codegen_meta::cdsl::encodings::EncodingContent

pub(crate) struct EncodingContent {
    inst: InstSpec,
    pub recipe: EncodingRecipeNumber,
    pub encbits: u16,
    pub inst_predicate: Option<InstructionPredicateNumber>,
    pub isa_predicate: Option<u8>,
    pub bound_type: Option<ValueType>,
}

Encoding for a concrete instruction.

An Encoding object ties an instruction opcode with concrete type variables together with an encoding recipe and encoding encbits.

The concrete instruction can be in three different forms:

  1. A naked opcode: trap for non-polymorphic instructions.
  2. With bound type variables: iadd.i32 for polymorphic instructions.
  3. With operands providing constraints: icmp.i32(intcc.eq, x, y).

If the instruction is polymorphic, all type variables must be provided.

Fields

inst: InstSpec

The Instruction or BoundInstruction being encoded.

recipe: EncodingRecipeNumber

The EncodingRecipe to use.

encbits: u16

Additional encoding bits to be interpreted by recipe.

inst_predicate: Option<InstructionPredicateNumber>

An instruction predicate that must be true to allow selecting this encoding.

isa_predicate: Option<u8>

An ISA predicate that must be true to allow selecting this encoding.

bound_type: Option<ValueType>

The value type this encoding has been bound to, for encodings of polymorphic instructions.

Methods

impl EncodingContent[src]

pub fn inst(&self) -> &Rc<InstructionContent>[src]

pub fn to_rust_comment(
    &self,
    recipes: &PrimaryMap<EncodingRecipeNumber, EncodingRecipe>
) -> String
[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, 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.