Overview of the Instruction Specification Generator (isagenerator)
masterThe isagenerator project is used to generate the C header files and structures required by the main Bitdefender disassembler. It consists of two primary components:
- Instruction specifications: Located in the
instructions/folder, these define instruction details including CPUID feature flags. - Generation scripts:
isg_x86: A Python package used to parse instruction specifications into structured classes.generate_tables.py: A script that uses the parsed data to generate the actual C files and structures.
Adding new instructions:
To add support for a new instruction, you typically only need to add it to the relevant table file within the instruction specifications. If the instruction requires a specific CPUID flag, you may also need to modify the corresponding CPUID files. Modifications to isg_x86 or generate_tables.py are generally only required when introducing a completely new encoding type.