Skip to main content

Module instruction

Module instruction 

Source
Expand description

Ghidra-style, flat p-code operations and their operands.

These types represent one instruction as a sequence of operations over varnodes. They deliberately complement, rather than replace, the source-shaped crate::PcodeAst. A producer lowers nested expressions to these operations by allocating temporaries in its unique space.

Structs§

BitRangeInfo
Metadata for a named SLEIGH bit range.
BodyWidths
The widths of one p-code body, and the locals that have none.
InstructionPcode
Flat p-code emitted for one machine instruction.
LabelId
Identifies one instruction-local p-code label.
PcodeOp
One flat p-code operation.
PcodePlan
Whole-instruction facts a consumer needs before p-code emission starts.
Varnode
A storage location or constant used as an input or output of a p-code op.

Enums§

Opcode
An opcode from Ghidra’s p-code operation reference.
PcodeLowerError
Failure while lowering source-shaped SLEIGH p-code to flat operations.
SymbolicWidth
A width resolved before decoding, which may still name an operand.

Traits§

PcodeLoweringContext
Producer-specific information required to lower a source-shaped AST.
PcodeSink
Receives resolved p-code operations as an instruction is emitted.
Width
A width in the domain a width-inference pass works over.

Functions§

emit_instruction
Lowers ast and reports each resolved operation to sink.
infer_local_sizes
Infers the local-variable widths of a source p-code body.
lower_instruction
Lowers a fully expanded source-shaped AST to Ghidra-style instruction p-code.
lower_instruction_into
Lowers ast and exposes its resolved flat p-code to sink without materializing an InstructionPcode for the caller.
plan_instruction
Collects the whole-instruction facts of ast without emitting p-code.
plan_instruction_with
Plans ast with local widths the producer has already resolved.
resolve_body_widths
Resolves the widths of a body’s locals and reports the ones with none.

Type Aliases§

LocalSizes
Widths, in bytes, of the local variables of one p-code body.