Struct cranelift_codegen_shared::isa::x86::EncodingBits [−][src]
pub struct EncodingBits(_);
Expand description
Named interface to the u16
Encoding bits, representing an opcode.
Cranelift requires each recipe to have a single encoding size in bytes. X86 opcodes are variable length, so we use separate recipes for different styles of opcodes and prefixes. The opcode format is indicated by the recipe name prefix.
VEX/XOP and EVEX prefixes are not yet supported. Encodings using any of these prefixes are represented by separate recipes.
The encoding bits are:
0-7: The opcode byte
Implementations
impl EncodingBits
[src]
impl EncodingBits
[src]pub fn new(op_bytes: &[u8], rrr: u16, rex_w: u16) -> Self
[src]
pub fn new(op_bytes: &[u8], rrr: u16, rex_w: u16) -> Self
[src]Constructs a new EncodingBits from parts.
pub fn with_rrr(self, rrr: u8) -> Self
[src]
pub fn with_rrr(self, rrr: u8) -> Self
[src]Returns a copy of the EncodingBits with the RRR bits set.
pub fn with_rex_w(self) -> Self
[src]
pub fn with_rex_w(self) -> Self
[src]Returns a copy of the EncodingBits with the REX.W bit set.
pub fn opcode_byte(self) -> u8
[src]
pub fn opcode_byte(self) -> u8
[src]Instruction opcode byte, without the prefix.
pub fn prefix(self) -> OpcodePrefix
[src]
pub fn prefix(self) -> OpcodePrefix
[src]Prefix kind for the instruction, as an enum.
Trait Implementations
impl Clone for EncodingBits
[src]
impl Clone for EncodingBits
[src]fn clone(&self) -> EncodingBits
[src]
fn clone(&self) -> EncodingBits
[src]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)
1.0.0[src]Performs copy-assignment from source
. Read more
impl PartialEq<EncodingBits> for EncodingBits
[src]
impl PartialEq<EncodingBits> for EncodingBits
[src]fn eq(&self, other: &EncodingBits) -> bool
[src]
fn eq(&self, other: &EncodingBits) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &EncodingBits) -> bool
[src]
fn ne(&self, other: &EncodingBits) -> bool
[src]This method tests for !=
.
impl Copy for EncodingBits
[src]
impl StructuralPartialEq for EncodingBits
[src]
Auto Trait Implementations
impl RefUnwindSafe for EncodingBits
impl Send for EncodingBits
impl Sync for EncodingBits
impl Unpin for EncodingBits
impl UnwindSafe for EncodingBits
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more