[−][src]Struct cranelift_codegen_meta::isa::x86::recipes::Template
Previously called a TailRecipe in the Python meta language, this allows to create multiple variants of a single base EncodingRecipe (rex prefix, specialized w/rrr bits, different opcodes). It serves as a prototype of an EncodingRecipe, which is then used when actually creating Encodings, in encodings.rs. This is an idiosyncrasy of the x86 meta-language, and could be reconsidered later.
Fields
regs: &'builder IsaRegs
Description of registers, used in the build() method.
recipe: EncodingRecipeBuilder
The recipe template, which is to be specialized (by copy).
rex_kind: RecipePrefixKind
How is the REX prefix emitted?
inferred_rex_compute_size: Option<&'static str>
Function for compute_size()
when REX is inferrable.
when_prefixed: Option<Rc<Template<'builder>>>
Other recipe to use when REX-prefixed.
w_bit: u16
Value of the W bit (0 or 1), stored in the EncodingBits.
rrr_bits: u16
Value of the RRR bits (between 0 and 0b111).
op_bytes: &'static [u8]
Opcode bytes.
Implementations
impl<'builder> Template<'builder>
[src]
fn new(recipe: EncodingRecipeBuilder, regs: &'builder IsaRegs) -> Self
[src]
fn name(&self) -> &str
[src]
fn rex_kind(self, kind: RecipePrefixKind) -> Self
[src]
fn inferred_rex_compute_size(self, function: &'static str) -> Self
[src]
fn when_prefixed(self, template: Rc<Template<'builder>>) -> Self
[src]
pub fn opcodes(&self, op_bytes: &'static [u8]) -> Self
[src]
pub fn w(&self) -> Self
[src]
pub fn rrr(&self, value: u16) -> Self
[src]
pub fn nonrex(&self) -> Self
[src]
pub fn rex(&self) -> Self
[src]
pub fn infer_rex(&self) -> Self
[src]
pub fn build(self) -> (EncodingRecipe, u16)
[src]
Trait Implementations
Auto Trait Implementations
impl<'builder> !RefUnwindSafe for Template<'builder>
impl<'builder> !Send for Template<'builder>
impl<'builder> !Sync for Template<'builder>
impl<'builder> Unpin for Template<'builder>
impl<'builder> !UnwindSafe for Template<'builder>
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>,