[−]Struct cranelift::prelude::isa::Encoding
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
pub fn new(recipe: u16, bits: u16) -> Encoding
Create a new Encoding
containing (recipe, bits)
.
pub fn recipe(self) -> usize
Get the recipe number in this encoding.
pub fn bits(self) -> u16
Get the recipe-specific encoding bits.
pub fn is_legal(self) -> bool
Is this a legal encoding, or the default placeholder?
Trait Implementations
impl Clone for Encoding
fn clone(&self) -> Encoding
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Encoding
impl Debug for Encoding
impl Default for Encoding
The default encoding is the illegal one.
impl Display for Encoding
ISA-independent display of an encoding.
impl Eq for Encoding
impl PartialEq<Encoding> for Encoding
impl StructuralEq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,