aarch64: Refactor system register data
authorVictor Do Nascimento <victor.donascimento@arm.com>
Mon, 2 Oct 2023 08:35:01 +0000 (09:35 +0100)
committerVictor Do Nascimento <victor.donascimento@arm.com>
Wed, 4 Oct 2023 11:21:53 +0000 (12:21 +0100)
commit5dd233b31414abfe10680baf63462f6d5fa8f139
tree30c7b003ca4c3bf9c2b39671915ac4d531f20211
parent1bf6696b594193c457091b90f7773f6b289b5dc4
aarch64: Refactor system register data

This patch  moves instances of system register definitions, represented
by the SYSREG macro, out of their original place in `aarch64-opc.c'
and into a dedicated .def file, `aarch64-sys-regs.def'.

System register entries in this new file are ordered alphabetically by
name.  This choice is made to enable the use of fast search algorithms
such as binary search when validating register names.

The SYSREG macro, defined as SYSREG (name, encoding, flags, features)
is kept as is and used in the def file, but all other SR_* macros
which previously served as indirections to SYSREG are removed.

opcodes/ChangeLog:
* aarch64-opc.c (SR_CORE): Macro definition and uses deleted.
(SR_FEAT): Likewise.
(SR_FEAT2): Likewise.
(SR_V8_1_A): Likewise.
(SR_V8_4_A): Likewise.
(SR_V8A): Likewise.
(SR_V8R): Likewise.
(SR_V8_1A): Likewise.
(SR_V8_2A): Likewise.
(SR_V8_3A): Likewise.
(SR_V8_4A): Likewise.
(SR_V8_6A): Likewise.
(SR_V8_7A): Likewise.
(SR_V8_8A): Likewise.
(SR_GIC): Likewise.
(SR_AMU): Likewise.
(SR_LOR): Likewise.
(SR_PAN): Likewise.
(SR_RAS): Likewise.
(SR_RNG): Likewise.
(SR_SME): Likewise.
(SR_SSBS): Likewise.
(SR_SVE): Likewise.
(SR_ID_PFR2): Likewise.
(SR_PROFILE): Likewise.
(SR_MEMTAG): Likewise.
(SR_SCXTNUM): Likewise.
(SR_EXPAND_ELx): Likewise.
(SR_EXPAND_EL12): Likewise.
* opcodes/aarch64-sys-regs.def: New.
opcodes/aarch64-opc.c
opcodes/aarch64-sys-regs.def [new file with mode: 0644]