pub struct EncodingSpec {
pub mnemonic: &'static str,
pub variant: &'static str,
pub opcode: u32,
pub opcode_mask: u32,
pub fields: &'static [BitFieldSpec],
pub operand_order: &'static [u8],
pub operand_kinds: &'static [OperandConstraintKind],
pub implicit_defaults: &'static [ImplicitField],
pub memory_addressing: MemoryAddressingConstraintSpec,
pub field_scales: &'static [u16],
pub split_immediate_plan: Option<SplitImmediatePlanSpec>,
pub gpr32_extend_compatibility: u64,
}Expand description
Encoding metadata for a single canonical instruction variant.
Fields§
§mnemonic: &'static strLower-case mnemonic (e.g. "add").
variant: &'static strCanonical variant ID from the source dataset.
opcode: u32Base opcode with fixed bits already applied.
opcode_mask: u32Mask of fixed bits in the opcode.
fields: &'static [BitFieldSpec]Operand field list in deterministic argument order.
operand_order: &'static [u8]Field indices, in user-facing operand order.
operand_kinds: &'static [OperandConstraintKind]Operand class constraints, aligned with EncodingSpec::operand_order.
implicit_defaults: &'static [ImplicitField]Implicit field defaults automatically filled during encoding.
memory_addressing: MemoryAddressingConstraintSpecPrecomputed memory addressing-mode constraint for this variant.
field_scales: &'static [u16]Per-field immediate scaling factors (1 means no scaling).
The slice is aligned with EncodingSpec::fields indices.
split_immediate_plan: Option<SplitImmediatePlanSpec>Precomputed split-immediate packing plan, if this variant uses one logical
immediate split across two bitfields (e.g. immlo/immhi, b5/b40).
gpr32_extend_compatibility: u64Bitset of operand slots where Gpr64Register accepts a Gpr32Register
when followed by an extend operand in the same variant.
Bit n corresponds to operand slot n.
Trait Implementations§
Source§impl Clone for EncodingSpec
impl Clone for EncodingSpec
Source§fn clone(&self) -> EncodingSpec
fn clone(&self) -> EncodingSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more