[][src]Struct cranelift::prelude::isa::Encoding

pub struct Encoding { /* fields omitted */ }

Bits needed to encode an instruction as binary machine code.

The encoding consists of two parts, both specific to the target ISA: An encoding recipe, and encoding bits. The recipe determines the native instruction format and the mapping of operands to encoded bits. The encoding bits provide additional information to the recipe, typically parts of the opcode.

Methods

impl Encoding[src]

pub fn new(recipe: u16, bits: u16) -> Encoding[src]

Create a new Encoding containing (recipe, bits).

pub fn recipe(self) -> usize[src]

Get the recipe number in this encoding.

pub fn bits(self) -> u16[src]

Get the recipe-specific encoding bits.

Is this a legal encoding, or the default placeholder?

Trait Implementations

impl Eq for Encoding[src]

impl Display for Encoding[src]

ISA-independent display of an encoding.

impl Debug for Encoding[src]

impl Clone for Encoding[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Encoding[src]

impl PartialEq<Encoding> for Encoding[src]

impl Default for Encoding[src]

The default encoding is the illegal one.

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.