aarch64: Check profile for non-alias opcodes
Extends AArch64 profile checks to non-alias instructions and replaces gotos with returns in the decoder.
This patch extends the AArch64 instruction decoding logic to verify that both alias and non-alias opcodes are available for the current CPU’s profile (A-profile vs. R-profile). It also refactors the aarch64_opcode_decode function to replace goto statements with immediate return statements, improving code readability and maintainability.
In Details
This patch updates opcodes/aarch64-dis.c by adding a check for CPU feature availability (A-profile vs. R-profile) for non-alias opcodes, mirroring existing checks for alias opcodes. Additionally, it cleans up the aarch64_opcode_decode function by eliminating goto statements and using early returns instead, which simplifies control flow.
- A-profile
- A specific configuration or feature set of the AArch64 architecture, distinct from R-profile.
- R-profile
- Another specific configuration or feature set of the AArch64 architecture, distinct from A-profile. Often associated with server or embedded use cases.
- Alias Opcode
- An instruction that is a synonym or alternative representation for another instruction, often for compatibility or historical reasons.
- goto
- A control flow statement in C that transfers execution to a different part of the program, often used for error handling or complex branching, but sometimes criticized for making code harder to follow.