Expand description
Core no_std types and encoding logic for AArch64 instruction synthesis.
This crate is the runtime heart of the project:
- [
types] defines the structured operand model and generated spec metadata. - [
engine] implements variant selection, validation, and bitfield encoding.
Design goals:
no_stdcompatibility (withalloconly where needed for diagnostics).- deterministic, metadata-driven encoding (no handwritten opcode tables).
- strict error reporting for ambiguous or invalid operand forms.
Typical call paths:
- high-level:
encodewith canonical mnemonic + structured operands. - low-level:
encode_by_spec_operandswhen variant/spec is already known. - dispatch assist:
operand_shape_keysfor precomputed shape-based routing.
Structs§
- BitField
Spec - Field metadata for an instruction operand bitfield.
- Encoding
Spec - Encoding metadata for a single canonical instruction variant.
- Extend
Operand - Extend modifier operand.
- Implicit
Field - Implicit default for one encoding field.
- Instruction
Code - AArch64 instruction with little-endian byte order.
- Memory
Operand - Memory operand.
- Operand
Constraint Signature - One expected operand-form signature expressed as constraint kinds.
- Operand
Shape Signature - One provided operand-form signature expressed as concrete shape tags.
- Register
List Operand - Register-list operand.
- Register
Operand - Register operand with optional vector arrangement/lane decorations.
- Shift
Operand - Shift modifier operand.
- Split
Immediate Plan Spec - Precomputed split-immediate descriptor for one encoding variant.
- SysReg
Operand - System-register operand encoded as architectural parts.
Enums§
- Addressing
Mode - Addressing mode for memory operands.
- Alias
NoMatch Hint - Structured alias mismatch hint.
- Condition
Code - AArch64 condition code.
- Core
NoMatch Hint - Structured core mismatch hint.
- Encode
Error - Encoder errors.
- Extend
Kind - Extend kind.
- Memory
Addressing Constraint Spec - Precomputed memory addressing constraint for one encoding variant.
- Memory
Offset - Offset for memory operands.
- Modifier
- Modifier used in memory index expressions.
- NoMatching
Hint - Structured no-match hint for
EncodeError::NoMatchingVariantHint. - Operand
- Structured operand used by
jit!and direct runtime encoding. - Operand
Constraint Kind - Per-slot operand constraint kind generated from AARCHMRS metadata.
- Operand
Shape Tag - Operand-shape atom used in structured mismatch diagnostics.
- Post
Index Offset - Post-index update component.
- RegClass
- Register family class used for mnemonic disambiguation.
- Shift
Kind - Shift kind.
- Split
Immediate Kind Spec - Split-immediate packing kind for one encoding variant.
- Vector
Arrangement - Vector arrangement suffix.
Functions§
- encode
- Selects a variant by mnemonic and typed operands and encodes it.
- encode_
by_ spec - Encodes one instruction variant by spec.
- encode_
by_ spec_ operands - Returns
EncodeErrorwhen operand count, kind, or ranges are invalid. - encode_
candidates - Encodes one mnemonic using a generated shortlist of candidate variant indices.
- operand_
shape_ keys - Computes packed operand-shape keys for all materialized flattenings of
operands.
Type Aliases§
- Operand
Shape Key - Packed key for one flattened operand-kind sequence.