[−][src]Struct cranelift_codegen_meta::isa::x86::encodings::PerCpuModeEncodings
Fields
enc32: Vec<Rc<EncodingContent>>
enc64: Vec<Rc<EncodingContent>>
recipes: PrimaryMap<EncodingRecipeNumber, EncodingRecipe>
recipes_by_name: HashMap<String, EncodingRecipeNumber>
inst_pred_reg: InstructionPredicateRegistry
Methods
impl PerCpuModeEncodings
[src]
fn new() -> Self
[src]
fn add_recipe(&mut self, recipe: EncodingRecipe) -> EncodingRecipeNumber
[src]
fn make_encoding<T>(
&mut self,
inst: InstSpec,
template: Template,
builder_closure: T
) -> Rc<EncodingContent> where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
[src]
&mut self,
inst: InstSpec,
template: Template,
builder_closure: T
) -> Rc<EncodingContent> where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
fn enc32_func<T>(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
fn enc32(&mut self, inst: impl Into<InstSpec>, template: Template)
[src]
fn enc32_isap(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: u8
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: u8
)
fn enc32_instp(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
fn enc32_rec(
&mut self,
inst: impl Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
[src]
&mut self,
inst: impl Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
fn enc64_func<T>(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
fn enc64(&mut self, inst: impl Into<InstSpec>, template: Template)
[src]
fn enc64_isap(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: u8
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: u8
)
fn enc64_instp(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
fn enc64_rec(
&mut self,
inst: impl Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
[src]
&mut self,
inst: impl Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
fn enc_i32_i64(&mut self, inst: impl Into<InstSpec>, template: Template)
[src]
Adds I32/I64 encodings as appropriate for a typed instruction. The REX prefix is always inferred at runtime.
Add encodings for inst.i32
to X86_32.
Add encodings for inst.i32
to X86_64 with optional, inferred REX.
Add encodings for inst.i64
to X86_64 with a REX.W prefix.
fn enc_i32_i64_explicit_rex(
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
Adds I32/I64 encodings as appropriate for a typed instruction. All variants of REX prefix are explicitly emitted, not inferred.
Add encodings for inst.i32
to X86_32.
Add encodings for inst.i32
to X86_64 with and without REX.
Add encodings for inst.i64
to X86_64 with and without REX.
fn enc_b32_b64(&mut self, inst: impl Into<InstSpec>, template: Template)
[src]
Adds B32/B64 encodings as appropriate for a typed instruction. The REX prefix is always inferred at runtime.
Adds encoding for inst.b32
to X86_32.
Adds encoding for inst.b32
to X86_64 with optional, inferred REX.
Adds encoding for inst.b64
to X86_64 with a REX.W prefix.
fn enc_i32_i64_rex_only(
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
Add encodings for inst.i32
to X86_32.
Add encodings for inst.i32
to X86_64 with a REX prefix.
Add encodings for inst.i64
to X86_64 with a REX.W prefix.
fn enc_i32_i64_instp(
&mut self,
inst: &Rc<InstructionContent>,
template: Template,
instp: InstructionPredicateNode
)
[src]
&mut self,
inst: &Rc<InstructionContent>,
template: Template,
instp: InstructionPredicateNode
)
Add encodings for inst.i32
to X86_32.
Add encodings for inst.i32
to X86_64 with and without REX.
Add encodings for inst.i64
to X86_64 with a REX.W prefix.
fn enc_r32_r64_rex_only(
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template
)
Add encodings for inst.r32
to X86_32.
Add encodings for inst.r64
to X86_64 with a REX.W prefix.
fn enc_r32_r64_ld_st(
&mut self,
inst: &Rc<InstructionContent>,
w_bit: bool,
template: Template
)
[src]
&mut self,
inst: &Rc<InstructionContent>,
w_bit: bool,
template: Template
)
fn enc_x86_64(&mut self, inst: impl Into<InstSpec> + Clone, template: Template)
[src]
Add encodings for inst
to X86_64 with and without a REX prefix.
fn enc_x86_64_instp(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
Add encodings for inst
to X86_64 with and without a REX prefix.
fn enc_x86_64_isap(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: u8
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: u8
)
fn enc_both(&mut self, inst: impl Clone + Into<InstSpec>, template: Template)
[src]
Add all three encodings for inst
:
- X86_32
- X86_64 with and without the REX prefix.
fn enc_both_isap(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: u8
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: u8
)
fn enc_both_instp(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
instp: InstructionPredicateNode
)
fn enc_both_rex_only(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template
)
Add two encodings for inst
:
- X86_32
- X86_64 with the REX prefix.
fn enc_i32_i64_ld_st(
&mut self,
inst: &Rc<InstructionContent>,
w_bit: bool,
template: Template
)
[src]
&mut self,
inst: &Rc<InstructionContent>,
w_bit: bool,
template: Template
)
Add encodings for inst.i32
to X86_32.
Add encodings for inst.i32
to X86_64 with and without REX.
Add encodings for inst.i64
to X86_64 with a REX prefix, using the w_bit
argument to determine whether or not to set the REX.W bit.
fn enc_32_64(&mut self, inst: impl Clone + Into<InstSpec>, template: Template)
[src]
Add the same encoding/template pairing to both X86_32 and X86_64
fn enc_32_64_rec(
&mut self,
inst: impl Clone + Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
recipe: &EncodingRecipe,
bits: u16
)
Add the same encoding/recipe pairing to both X86_32 and X86_64
fn enc_32_64_func<T>(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
builder_closure: T
) where
T: FnOnce(EncodingBuilder) -> EncodingBuilder,
Add the same encoding to both X86_32 and X86_64; assumes configuration (e.g. REX, operand binding) has already happened
fn enc_32_64_maybe_isap(
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: Option<u8>
)
[src]
&mut self,
inst: impl Clone + Into<InstSpec>,
template: Template,
isap: Option<u8>
)
Add the same encoding to both X86_32 and X86_64; assumes configuration (e.g. REX, operand binding) has already happened.
fn enc32_maybe_isap(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: Option<u8>
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: Option<u8>
)
fn enc64_maybe_isap(
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: Option<u8>
)
[src]
&mut self,
inst: impl Into<InstSpec>,
template: Template,
isap: Option<u8>
)
Auto Trait Implementations
impl !RefUnwindSafe for PerCpuModeEncodings
impl !Send for PerCpuModeEncodings
impl !Sync for PerCpuModeEncodings
impl Unpin for PerCpuModeEncodings
impl !UnwindSafe for PerCpuModeEncodings
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, 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>,