[−][src]Struct cranelift_codegen_meta::cdsl::encodings::EncodingContent
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:
- A naked opcode:
trap
for non-polymorphic instructions. - With bound type variables:
iadd.i32
for polymorphic instructions. - 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.
Implementations
impl EncodingContent
[src]
pub fn inst(&self) -> &Rc<InstructionContent>
[src]
pub fn to_rust_comment(
&self,
recipes: &PrimaryMap<EncodingRecipeNumber, EncodingRecipe>
) -> String
[src]
&self,
recipes: &PrimaryMap<EncodingRecipeNumber, EncodingRecipe>
) -> String
Auto Trait Implementations
impl !RefUnwindSafe for EncodingContent
impl !Send for EncodingContent
impl !Sync for EncodingContent
impl Unpin for EncodingContent
impl !UnwindSafe for EncodingContent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,