aarch64: Add more alias validation to aarch64-gen
Enhances AArch64 opcode validation to ensure alias consistency.
This patch improves validation in opcodes/aarch64-gen.c to ensure consistency in AArch64 instruction aliasing. It verifies that all opcodes marked F_ALIAS correctly alias an opcode marked F_HAS_ALIAS, and vice-versa. It also checks for consistent usage of F_ALIAS, F_HAS_ALIAS, and F_PSEUDO flags across related opcodes. Redundant error checks are removed as a result of these new validations.
In Details
Enhances the opcode table validation in opcodes/aarch64-gen.c. It introduces checks to ensure that the F_ALIAS and F_HAS_ALIAS flags are used correctly and consistently. Specifically, it verifies that every opcode marked as an alias (F_ALIAS) points to a valid opcode that has aliases (F_HAS_ALIAS), and that every opcode with F_HAS_ALIAS has at least one actual alias defined. This improves the integrity of the opcode table and catches potential inconsistencies during the build process.
- F_ALIAS
- A flag indicating that an opcode is an alias for another instruction.
- F_HAS_ALIAS
- A flag indicating that an opcode has one or more aliases.
- F_PSEUDO
- A flag indicating a pseudo-instruction, which is not a real machine instruction but is used in assembly language.