mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-10-28 19:00:52 +08:00
This tool reads data from loongarch-opcodes.git and generates three data files. encoding.zig contains an enum of mnemonics, a packed union of packed structs to represent bit-fields in instructions and encoder functions for each instruction. inst_formats.zon contains required target feature set for each instruction, which can be used by the backend to, under debug mode, verify if it emits any instruction that is not supported by the compilation target. It also contains information about slots in each instruction format, their type, location and postprocessing, which can be used by disassemblers. decode_tree.zon is the auto-generated decode tree, which will be used by disassemblers. Signed-off-by: xtex <xtex@astrafall.org>