Module ast

Source
Expand description

Components relating to the abstract syntax trees (ASTs) used in representing assembly instructions.

These components together are used to construct…

  • asm::AsmInstr (a data structure holding an assembly source code instruction),
  • asm::Directive (a data structure holding an assembly source code directive),
  • and sim::SimInstr (a data structure holding a bytecode instruction).

Modules§

asm
This module holds the AST for statements from assembly source code.
sim
This module is used for holding simulation instructions (SimInstr), which are instructions that directly map to bytecode.

Structs§

Label
A label.
Offset
A value representing an offset or an immediate value.

Enums§

ImmOrReg
A value representing either an immediate value or a register.
OffsetNewErr
The errors that can result from calling Offset::new.
PCOffset
An offset or a label.
Reg
A register. Must be between 0 and 7.

Type Aliases§

CondCode
A condition code (used for BR), must be between 0 and 7.
IOffset
A value representing a signed offset or a signed immediate value.
TrapVect8
An unsigned 8-bit trap vector (used for TRAP).