Skip to main content

Crate jit_core

Crate jit_core 

Source
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_std compatibility (with alloc only where needed for diagnostics).
  • deterministic, metadata-driven encoding (no handwritten opcode tables).
  • strict error reporting for ambiguous or invalid operand forms.

Typical call paths:

Structs§

BitFieldSpec
Field metadata for an instruction operand bitfield.
EncodingSpec
Encoding metadata for a single canonical instruction variant.
ExtendOperand
Extend modifier operand.
ImplicitField
Implicit default for one encoding field.
InstructionCode
AArch64 instruction with little-endian byte order.
MemoryOperand
Memory operand.
OperandConstraintSignature
One expected operand-form signature expressed as constraint kinds.
OperandShapeSignature
One provided operand-form signature expressed as concrete shape tags.
RegisterListOperand
Register-list operand.
RegisterOperand
Register operand with optional vector arrangement/lane decorations.
ShiftOperand
Shift modifier operand.
SplitImmediatePlanSpec
Precomputed split-immediate descriptor for one encoding variant.
SysRegOperand
System-register operand encoded as architectural parts.

Enums§

AddressingMode
Addressing mode for memory operands.
AliasNoMatchHint
Structured alias mismatch hint.
ConditionCode
AArch64 condition code.
CoreNoMatchHint
Structured core mismatch hint.
EncodeError
Encoder errors.
ExtendKind
Extend kind.
MemoryAddressingConstraintSpec
Precomputed memory addressing constraint for one encoding variant.
MemoryOffset
Offset for memory operands.
Modifier
Modifier used in memory index expressions.
NoMatchingHint
Structured no-match hint for EncodeError::NoMatchingVariantHint.
Operand
Structured operand used by jit! and direct runtime encoding.
OperandConstraintKind
Per-slot operand constraint kind generated from AARCHMRS metadata.
OperandShapeTag
Operand-shape atom used in structured mismatch diagnostics.
PostIndexOffset
Post-index update component.
RegClass
Register family class used for mnemonic disambiguation.
ShiftKind
Shift kind.
SplitImmediateKindSpec
Split-immediate packing kind for one encoding variant.
VectorArrangement
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 EncodeError when 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§

OperandShapeKey
Packed key for one flattened operand-kind sequence.