Skip to main content

Module platform

Module platform 

Source
Expand description

Processor drivers.

The disassembler is generic over the CPU it decodes. A Platform driver turns raw bytes into a CPU-neutral DecodedInsn and declares the address regions that CPU exposes, so the rest of the crate never names a concrete instruction set. The one built-in driver lives in i8051, a caller can supply its own (including user-defined regions).

Modules§

i8051
The Intel 8051 (MCS-51) driver.
m6805
The Motorola 6805 (M68HC05) driver.
mos6502
The MOS 6502 driver.

Structs§

CanonicalAddr
The canonical address for a location.
DataRef
A static data reference an instruction makes, already classified into an address space by the driver (which owns the CPU’s memory-map semantics).
DecodedInsn
A CPU-neutral decoded instruction: everything the disassembler needs to render, trace, and cross-reference an instruction without knowing the ISA.
EntryPoint
A known CPU entry point.
RegionDef
A driver-declared address region.

Enums§

Certainty
Whether a reference is definite (unambiguous) or inferred (one of many options).
ControlFlow
How execution proceeds after an instruction. CPU-neutral: every driver maps its own control flow onto these cases.
RegionKind
What a region holds, advisory metadata a driver attaches to each space.

Constants§

BUILTIN_PLATFORMS
The built-in driver names, in a stable order.

Traits§

Platform
A processor driver: decodes bytes and declares the CPU’s address regions and known entry points.

Functions§

branch_target
The absolute branch/jump/call target of insn, if it has one.
branch_target_operand_index
Which operand holds the branch target (for label substitution), or None.
by_name
Look up a built-in driver by name (see BUILTIN_PLATFORMS).
suggest_names
Built-in CPU names closest to query, substring matches first, then by Levenshtein distance.
xrefs_from_instruction
The control-flow and data cross-references an instruction makes from source. Control edges come from the neutral control flow, data edges are the driver’s pre-classified DataRefs.

Type Aliases§

PlatformRef
Handy alias for a shared driver.