Struct cranelift_codegen::isa::Encoding [−][src]
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]
impl Encoding
pub fn new(recipe: u16, bits: u16) -> Self
[src]
pub fn new(recipe: u16, bits: u16) -> Self
Create a new Encoding
containing (recipe, bits)
.
pub fn recipe(self) -> usize
[src]
pub fn recipe(self) -> usize
Get the recipe number in this encoding.
pub fn bits(self) -> u16
[src]
pub fn bits(self) -> u16
Get the recipe-specific encoding bits.
pub fn is_legal(self) -> bool
[src]
pub fn is_legal(self) -> bool
Is this a legal encoding, or the default placeholder?
Trait Implementations
impl Clone for Encoding
[src]
impl Clone for Encoding
fn clone(&self) -> Encoding
[src]
fn clone(&self) -> Encoding
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Encoding
[src]
impl Copy for Encoding
impl Debug for Encoding
[src]
impl Debug for Encoding
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Encoding
[src]
impl PartialEq for Encoding
fn eq(&self, other: &Encoding) -> bool
[src]
fn eq(&self, other: &Encoding) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Encoding) -> bool
[src]
fn ne(&self, other: &Encoding) -> bool
This method tests for !=
.
impl Eq for Encoding
[src]
impl Eq for Encoding
impl Default for Encoding
[src]
impl Default for Encoding
The default encoding is the illegal one.
impl Display for Encoding
[src]
impl Display for Encoding
ISA-independent display of an encoding.