]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
aarch64: Use an enum to refer to indices in the opcode table
authorRichard Earnshaw <rearnsha@arm.com>
Mon, 21 Jul 2025 15:40:12 +0000 (16:40 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Mon, 21 Jul 2025 17:18:51 +0000 (18:18 +0100)
commit0454220d5883273decbdf7fc1d434c9a1b2c15eb
tree25e230975eaf91e0a69ba4a34e045728728d25fd
parent63de89b2c1d503575a79669af1c9251bf67140bf
aarch64: Use an enum to refer to indices in the opcode table

The indices into the auto-generated tables for opcodes are relatively
unstable.  Adding a new opcode can permute the code significantly.
But most of this churn is down to changes in the index values.  To
minimize this use enumerated constants.  While the index values
change, the enumeration names will need to do so far less often, so
most of the changes in the generated code become localized to the
addition (occasionally removal) of opcodes.  This change also makes
the state-change comments unnecessary.  The enumeration names contain
the same information (and more), so these are simply deleted.

The enumeration values are placed in a new header file, aarch64-tbl-2.h,
so aarch64-gen gains a new option to build this header and the Makefile
rules are adjusted accordingly.
opcodes/Makefile.am
opcodes/Makefile.in
opcodes/aarch64-asm-2.c
opcodes/aarch64-dis-2.c
opcodes/aarch64-gen.c
opcodes/aarch64-opc-2.c
opcodes/aarch64-tbl-2.h [new file with mode: 0644]