aarch64: Store aarch64_find_next_opcode data in an array
Replaces a switch statement with an array lookup for AArch64 instruction decoding.
This patch updates opcodes/aarch64-dis-2.c to store the data for aarch64_find_next_opcode in an array instead of using a large switch statement. This simplifies the lookup process for instruction decoding and sets the stage for removing the decode tree data structure in a subsequent commit. The change is presented as a simplification and preparation for further refactoring.
In Details
Replaces the switch statement in aarch64_find_next_opcode within opcodes/aarch64-dis-2.c with an array-based lookup. This is a preparatory step to removing the decode tree entirely, simplifying the instruction lookup mechanism. The array stores the mapping from instruction keys to their corresponding opcode indices, offering a more direct and potentially faster lookup compared to a deeply nested switch.
- aarch64_find_next_opcode
- A function in the AArch64 disassembler responsible for determining the next opcode in a decoding sequence, likely used to resolve instruction variants or aliases.