Instruction DB

Instruction database (introspection, read/write, validation, ...).


AsmJit provides a public instruction database that can be used to query information about a complete instruction. The instruction database requires the following:

  • ArchInfo - Information about target architecture.
  • BaseInst - Base instruction that contains instruction id, options, and a possible extra-register.
  • Operand - Represents operands the instruction uses.

Each instruction can be then queried for the following information:

  • InstRWInfo - Read/write information of instruction and its oprands.
  • OpRWInfo - Read/write information of a single operand, part of InstRWInfo data structure.
  • BaseFeatures - CPU features required to execute the instruction.

In addition to query functionality AsmJit is also able to validate whether an instruction and its operands are valid. This is useful for making sure that what user tries to emit is correct and it can be also used by other projects that parse user input, like AsmTK project.

Query API

The instruction query API is provided by InstAPI namespace.

TODO: Missing documentation

Validation API

TODO: Missing documentation