[PATCH 00/28] aarch64: Improvements to aarch64-gen

Alice Carlotti alice.carlotti@arm.com
Wed Nov 4 18:39:40 GMT 2026


This is a series of patches based around simplications to the opcode lookup
code and its generation by aarch64-gen.

The functional changes are:
- Patch 02/28: Extended checks for A-profile/R-profile instructions to include
  non-alias opcodes.
- Patch 05/28: If `-M no-aliases' is specified, then a few more opcodes (SME
  and GCS system instructions) will be skipped.
- Patch 26/28: Alias opcodes are now allowed to match the opcode and mask of
  multiple F_HAS_ALIAS opcodes.  This will eventually be needed to support
  HINTE aliases.
- Patch 27/28: A GICR encoding bug fix (patch 27) that I intend to push
  separately, but included here because I don't want to rebase all the
  generated file changes unnecessarily.

Otherwise:
- Patch 01/28 improves the Makefile to avoid leaving broken generated files.
- Patches 03-07/28 cleanup existing opcode table data.
- Patches 08-11/28 remove some unnecessary generated code, along with the
  assembly and disassembly code that had to handle those unnecessary cases.
- Patches 12-24/28 refactor and simplify aarch64-gen, with increased validation
  and some changes to the generated code (but no change to its use).
- Patches 25-28/28 extend the decode tree to include most alias opcodes, and
  tighten some masks.

Two noteworthy non-functional improvements:
- All decode prioritisation is now specified with explicit flags.   The order
  of opcode table entries has no functional impact (verified on existing data
  by reversing the parse order of the array).
- The binary decode tree can extend deeper into some groups of overlapping
  opcodes, reducing the length of some aarch64_find_next_opcode chains.

The overall change to aarch64-gen.c is 362 insertions(+), 647 deletions(-).

Apart from patch 27, I'll leave this at least a week or so for comments before
pushing.

Alice


More information about the Binutils mailing list