[−][src]Struct cranelift_codegen_shared::isa::x86::EncodingBits
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]
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]
Returns a copy of the EncodingBits with the RRR bits set.
pub fn with_rex_w(self) -> Self
[src]
Returns a copy of the EncodingBits with the REX.W bit set.
pub fn bits(self) -> u16
[src]
Returns the raw bits.
pub fn opcode_byte(self) -> u8
[src]
Instruction opcode byte, without the prefix.
pub fn prefix(self) -> OpcodePrefix
[src]
Prefix kind for the instruction, as an enum.
pub fn pp(self) -> u8
[src]
Extracts the PP bits of the OpcodePrefix.
pub fn mm(self) -> u8
[src]
Extracts the MM bits of the OpcodePrefix.
pub fn rrr(self) -> u8
[src]
Bits for the ModR/M byte for certain opcodes.
pub fn rex_w(self) -> u8
[src]
REX.W bit (or VEX.W/E).
Trait Implementations
impl Clone for EncodingBits
[src]
fn clone(&self) -> EncodingBits
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for EncodingBits
[src]
impl From<u16> for EncodingBits
[src]
impl PartialEq<EncodingBits> for EncodingBits
[src]
fn eq(&self, other: &EncodingBits) -> bool
[src]
fn ne(&self, other: &EncodingBits) -> bool
[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> 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, 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>,