Module program

Source

Modules§

asm

Macros§

build_static_dispatch_table

Structs§

FrameInfo
ISA32_V1
ISA32_V1_NoSbrk
ISA64_V1
ISA64_V1_NoSbrk
Imports
ImportsIter
InstructionFormat
Instructions
JumpTable
JumpTableIter
LineProgram
A line program state machine.
ParsedInstruction
ProgramBlob
A partially deserialized PolkaVM program.
ProgramCounter
ProgramExport
ProgramParseError
ProgramParts
ProgramSymbol
RawReg
RegionInfo
Debug information about a given region of bytecode.

Enums§

FrameKind
Instruction
LineProgramOp
Opcode
Reg
SourceLocation
The source location.

Constants§

BITMASK_MAX
BLOB_LEN_OFFSET
BLOB_LEN_SIZE
BLOB_MAGIC
The magic bytes with which every program blob must start with.
BLOB_VERSION_V1_32
BLOB_VERSION_V1_64
MAX_INSTRUCTION_LENGTH
SECTION_CODE_AND_JUMP_TABLE
SECTION_END_OF_FILE
SECTION_EXPORTS
SECTION_IMPORTS
SECTION_MEMORY_CONFIG
SECTION_OPT_DEBUG_LINE_PROGRAMS
SECTION_OPT_DEBUG_LINE_PROGRAM_RANGES
SECTION_OPT_DEBUG_STRINGS
SECTION_RO_DATA
SECTION_RW_DATA
VERSION_DEBUG_LINE_PROGRAM_V1

Traits§

InstructionSet
InstructionVisitor
OpcodeVisitor
The lowest level visitor; dispatches directly on opcode numbers.
ParsingVisitor

Functions§

find_start_of_basic_block
get_bit_for_offset
is_jump_target_valid
Returns whether a jump to a given offset is allowed.
read_args_imm
read_args_imm2
read_args_offset
read_args_reg_imm
read_args_reg_imm2
read_args_reg_imm64
read_args_reg_imm_offset
read_args_regs2
read_args_regs3
read_args_regs2_imm
read_args_regs2_imm2
read_args_regs2_offset

Type Aliases§

BlobLen
The blob length is the length of the blob itself encoded as an 64bit LE integer. By embedding this metadata into the header, program blobs stay opaque, however this information can still easily be retrieved. Found at offset 5 after the magic bytes and version number.
DefaultInstructionSet