aarch64: Improvements to aarch64-gen
Series of patches overhauls AArch64 opcode generation and lookup for simplification and efficiency.
This patch series introduces significant improvements to the AArch64 opcode generation and lookup mechanisms within binutils. Key changes include extending profile checks to non-alias instructions, refining the decode tree, and allowing alias opcodes to match multiple F_HAS_ALIAS entries. The series also streamlines the aarch64-gen tool itself, enhances validation, and updates the build process to handle generation failures gracefully. These changes aim to simplify the opcode table, improve decoding efficiency, and increase overall maintainability.
In Details
This is the cover letter for a series of 28 patches touching AArch64 instruction decoding and generation in binutils. The core of the work appears to be in refactoring aarch64-gen.c and the generated opcode tables (aarch64-tbl-*.h, aarch64-dis-*.c). Notable functional changes include expanding profile checks for instructions, allowing more flexible alias opcode matching, and fixing a GICR encoding bug. Non-functional improvements focus on making decode prioritization explicit via flags, removing the functional impact of table order, and reducing aarch64_find_next_opcode chain lengths…
- aarch64-gen
- A code generator tool within binutils responsible for creating AArch64 assembler, disassembler, and opcode table source files from definitions.
- Opcode Table
- A data structure used by disassemblers and assemblers to map instruction byte patterns to mnemonic names and vice-versa. In binutils, these tables define the instructions a specific architecture supports.
- F_HAS_ALIAS
- A flag used in the AArch64 opcode table to denote an instruction that is an alias for another instruction.
- Decode Tree
- A hierarchical data structure used in instruction decoders to efficiently map instruction bit patterns to their corresponding operations.
- A-profile / R-profile
- Different feature sets or configurations of the AArch64 architecture, where instructions may be available in one but not the other.
- GICR
- Likely refers to a specific instruction or feature within the AArch64 architecture, possibly related to Generic Interrupt Controller Region or similar.