aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-11-30 17:50:25 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-11-30 17:50:25 +0000
commite9dac4f0125752f64f7fa76ff4208a3b56493a19 (patch)
tree915a044208e00738717dbb6bbc3e6e96f135818b /opcodes
parent3de8c82a4af7c9a0b5901d154cd74b59490aa16e (diff)
downloadfsf-binutils-gdb-e9dac4f0125752f64f7fa76ff4208a3b56493a19.zip
fsf-binutils-gdb-e9dac4f0125752f64f7fa76ff4208a3b56493a19.tar.gz
fsf-binutils-gdb-e9dac4f0125752f64f7fa76ff4208a3b56493a19.tar.bz2
aarch64: Add missing system registers [PR27145]
This patch adds support for various system registers, up to Armv8.7-A. This includes all the registers that were mentioned in the PR and that hadn't become supported since. opcodes/ PR aarch64/27145 * aarch64-opc.c (SR_V8_4): Remove duplicate definition. (SR_V8_6, SR_V8_7, SR_GIC, SR_AMU): New macros. (aarch64_sys_regs): Add missing entries (up to Armv8.7-A). gas/ PR aarch64/27145 * testsuite/gas/aarch64/sysreg-8.s, * testsuite/gas/aarch64/sysreg-8.d, * testsuite/gas/aarch64/illegal-sysreg-8.s, * testsuite/gas/aarch64/illegal-sysreg-8.d, * testsuite/gas/aarch64/illegal-sysreg-8.l, * testsuite/gas/aarch64/illegal-sysreg-8b.s, * testsuite/gas/aarch64/illegal-sysreg-8b.d, * testsuite/gas/aarch64/illegal-sysreg-8b.l: New tests. * testsuite/gas/aarch64/sysreg.s: Change system register numbers to ones that are still unallocated. * testsuite/gas/aarch64/sysreg.d: Update accordingly.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/aarch64-opc.c167
1 files changed, 166 insertions, 1 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index a095915..25f96c6 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -3989,7 +3989,12 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
#define SR_V8_2(n,e,f) SR_FEAT (n,e,f,V8_2)
#define SR_V8_3(n,e,f) SR_FEAT (n,e,f,V8_3)
#define SR_V8_4(n,e,f) SR_FEAT (n,e,f,V8_4)
-#define SR_V8_4(n,e,f) SR_FEAT (n,e,f,V8_4)
+#define SR_V8_6(n,e,f) SR_FEAT (n,e,f,V8_6)
+#define SR_V8_7(n,e,f) SR_FEAT (n,e,f,V8_7)
+/* Has no separate libopcodes feature flag, but separated out for clarity. */
+#define SR_GIC(n,e,f) SR_CORE (n,e,f)
+/* Has no separate libopcodes feature flag, but separated out for clarity. */
+#define SR_AMU(n,e,f) SR_FEAT (n,e,f,V8_4)
#define SR_LOR(n,e,f) SR_FEAT (n,e,f,LOR)
#define SR_PAN(n,e,f) SR_FEAT (n,e,f,PAN)
#define SR_RAS(n,e,f) SR_FEAT (n,e,f,RAS)
@@ -4064,6 +4069,7 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_CORE ("aidr_el1", CPENC (3,1,C0,C0,7), F_REG_READ),
SR_CORE ("dczid_el0", CPENC (3,3,C0,C0,7), F_REG_READ),
SR_CORE ("id_dfr0_el1", CPENC (3,0,C0,C1,2), F_REG_READ),
+ SR_CORE ("id_dfr1_el1", CPENC (3,0,C0,C3,5), F_REG_READ),
SR_CORE ("id_pfr0_el1", CPENC (3,0,C0,C1,0), F_REG_READ),
SR_CORE ("id_pfr1_el1", CPENC (3,0,C0,C1,1), F_REG_READ),
SR_ID_PFR2 ("id_pfr2_el1", CPENC (3,0,C0,C3,4), F_REG_READ),
@@ -4073,16 +4079,19 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_CORE ("id_mmfr2_el1", CPENC (3,0,C0,C1,6), F_REG_READ),
SR_CORE ("id_mmfr3_el1", CPENC (3,0,C0,C1,7), F_REG_READ),
SR_CORE ("id_mmfr4_el1", CPENC (3,0,C0,C2,6), F_REG_READ),
+ SR_CORE ("id_mmfr5_el1", CPENC (3,0,C0,C3,6), F_REG_READ),
SR_CORE ("id_isar0_el1", CPENC (3,0,C0,C2,0), F_REG_READ),
SR_CORE ("id_isar1_el1", CPENC (3,0,C0,C2,1), F_REG_READ),
SR_CORE ("id_isar2_el1", CPENC (3,0,C0,C2,2), F_REG_READ),
SR_CORE ("id_isar3_el1", CPENC (3,0,C0,C2,3), F_REG_READ),
SR_CORE ("id_isar4_el1", CPENC (3,0,C0,C2,4), F_REG_READ),
SR_CORE ("id_isar5_el1", CPENC (3,0,C0,C2,5), F_REG_READ),
+ SR_CORE ("id_isar6_el1", CPENC (3,0,C0,C2,7), F_REG_READ),
SR_CORE ("mvfr0_el1", CPENC (3,0,C0,C3,0), F_REG_READ),
SR_CORE ("mvfr1_el1", CPENC (3,0,C0,C3,1), F_REG_READ),
SR_CORE ("mvfr2_el1", CPENC (3,0,C0,C3,2), F_REG_READ),
SR_CORE ("ccsidr_el1", CPENC (3,1,C0,C0,0), F_REG_READ),
+ SR_V8_3 ("ccsidr2_el1", CPENC (3,1,C0,C0,2), F_REG_READ),
SR_CORE ("id_aa64pfr0_el1", CPENC (3,0,C0,C4,0), F_REG_READ),
SR_CORE ("id_aa64pfr1_el1", CPENC (3,0,C0,C4,1), F_REG_READ),
SR_CORE ("id_aa64dfr0_el1", CPENC (3,0,C0,C5,0), F_REG_READ),
@@ -4429,6 +4438,9 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_CORE ("pmccfiltr_el0", CPENC (3,3,C14,C15,7), 0),
SR_V8_4 ("dit", CPEN_ (3,C2,5), 0),
+ SR_V8_4 ("trfcr_el1", CPENC (3,0,C1,C2,1), 0),
+ SR_V8_4 ("pmmir_el1", CPENC (3,0,C9,C14,6), F_REG_READ),
+ SR_V8_4 ("trfcr_el2", CPENC (3,4,C1,C2,1), 0),
SR_V8_4 ("vstcr_el2", CPENC (3,4,C2,C6,2), 0),
SR_V8_4_A ("vsttbr_el2", CPENC (3,4,C2,C6,0), 0),
SR_V8_4 ("cnthvs_tval_el2", CPENC (3,4,C14,C4,0), 0),
@@ -4439,6 +4451,7 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_V8_4 ("cnthps_ctl_el2", CPENC (3,4,C14,C5,1), 0),
SR_V8_4 ("sder32_el2", CPENC (3,4,C1,C3,1), 0),
SR_V8_4 ("vncr_el2", CPENC (3,4,C2,C2,0), 0),
+ SR_V8_4 ("trfcr_el12", CPENC (3,5,C1,C2,1), 0),
SR_CORE ("mpam0_el1", CPENC (3,0,C10,C5,1), 0),
SR_CORE ("mpam1_el1", CPENC (3,0,C10,C5,0), 0),
@@ -4715,6 +4728,7 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_CORE ("csrptr_el2", CPENC (2,4,C8,C0,1), 0),
SR_CORE ("csrptridx_el2", CPENC (2,4,C8,C0,3), F_REG_READ),
+ SR_LOR ("lorid_el1", CPENC (3,0,C10,C4,7), F_REG_READ),
SR_LOR ("lorc_el1", CPENC (3,0,C10,C4,3), 0),
SR_LOR ("lorea_el1", CPENC (3,0,C10,C4,1), 0),
SR_LOR ("lorn_el1", CPENC (3,0,C10,C4,2), 0),
@@ -4850,6 +4864,157 @@ const aarch64_sys_reg aarch64_sys_regs [] =
SR_SME ("tpidr2_el0", CPENC (3,3,C13,C0,5), 0),
SR_SME ("mpamsm_el1", CPENC (3,0,C10,C5,3), 0),
+ SR_AMU ("amcr_el0", CPENC (3,3,C13,C2,0), 0),
+ SR_AMU ("amcfgr_el0", CPENC (3,3,C13,C2,1), F_REG_READ),
+ SR_AMU ("amcgcr_el0", CPENC (3,3,C13,C2,2), F_REG_READ),
+ SR_AMU ("amuserenr_el0", CPENC (3,3,C13,C2,3), 0),
+ SR_AMU ("amcntenclr0_el0", CPENC (3,3,C13,C2,4), 0),
+ SR_AMU ("amcntenset0_el0", CPENC (3,3,C13,C2,5), 0),
+ SR_AMU ("amcntenclr1_el0", CPENC (3,3,C13,C3,0), 0),
+ SR_AMU ("amcntenset1_el0", CPENC (3,3,C13,C3,1), 0),
+ SR_AMU ("amevcntr00_el0", CPENC (3,3,C13,C4,0), 0),
+ SR_AMU ("amevcntr01_el0", CPENC (3,3,C13,C4,1), 0),
+ SR_AMU ("amevcntr02_el0", CPENC (3,3,C13,C4,2), 0),
+ SR_AMU ("amevcntr03_el0", CPENC (3,3,C13,C4,3), 0),
+ SR_AMU ("amevtyper00_el0", CPENC (3,3,C13,C6,0), F_REG_READ),
+ SR_AMU ("amevtyper01_el0", CPENC (3,3,C13,C6,1), F_REG_READ),
+ SR_AMU ("amevtyper02_el0", CPENC (3,3,C13,C6,2), F_REG_READ),
+ SR_AMU ("amevtyper03_el0", CPENC (3,3,C13,C6,3), F_REG_READ),
+ SR_AMU ("amevcntr10_el0", CPENC (3,3,C13,C12,0), 0),
+ SR_AMU ("amevcntr11_el0", CPENC (3,3,C13,C12,1), 0),
+ SR_AMU ("amevcntr12_el0", CPENC (3,3,C13,C12,2), 0),
+ SR_AMU ("amevcntr13_el0", CPENC (3,3,C13,C12,3), 0),
+ SR_AMU ("amevcntr14_el0", CPENC (3,3,C13,C12,4), 0),
+ SR_AMU ("amevcntr15_el0", CPENC (3,3,C13,C12,5), 0),
+ SR_AMU ("amevcntr16_el0", CPENC (3,3,C13,C12,6), 0),
+ SR_AMU ("amevcntr17_el0", CPENC (3,3,C13,C12,7), 0),
+ SR_AMU ("amevcntr18_el0", CPENC (3,3,C13,C13,0), 0),
+ SR_AMU ("amevcntr19_el0", CPENC (3,3,C13,C13,1), 0),
+ SR_AMU ("amevcntr110_el0", CPENC (3,3,C13,C13,2), 0),
+ SR_AMU ("amevcntr111_el0", CPENC (3,3,C13,C13,3), 0),
+ SR_AMU ("amevcntr112_el0", CPENC (3,3,C13,C13,4), 0),
+ SR_AMU ("amevcntr113_el0", CPENC (3,3,C13,C13,5), 0),
+ SR_AMU ("amevcntr114_el0", CPENC (3,3,C13,C13,6), 0),
+ SR_AMU ("amevcntr115_el0", CPENC (3,3,C13,C13,7), 0),
+ SR_AMU ("amevtyper10_el0", CPENC (3,3,C13,C14,0), 0),
+ SR_AMU ("amevtyper11_el0", CPENC (3,3,C13,C14,1), 0),
+ SR_AMU ("amevtyper12_el0", CPENC (3,3,C13,C14,2), 0),
+ SR_AMU ("amevtyper13_el0", CPENC (3,3,C13,C14,3), 0),
+ SR_AMU ("amevtyper14_el0", CPENC (3,3,C13,C14,4), 0),
+ SR_AMU ("amevtyper15_el0", CPENC (3,3,C13,C14,5), 0),
+ SR_AMU ("amevtyper16_el0", CPENC (3,3,C13,C14,6), 0),
+ SR_AMU ("amevtyper17_el0", CPENC (3,3,C13,C14,7), 0),
+ SR_AMU ("amevtyper18_el0", CPENC (3,3,C13,C15,0), 0),
+ SR_AMU ("amevtyper19_el0", CPENC (3,3,C13,C15,1), 0),
+ SR_AMU ("amevtyper110_el0", CPENC (3,3,C13,C15,2), 0),
+ SR_AMU ("amevtyper111_el0", CPENC (3,3,C13,C15,3), 0),
+ SR_AMU ("amevtyper112_el0", CPENC (3,3,C13,C15,4), 0),
+ SR_AMU ("amevtyper113_el0", CPENC (3,3,C13,C15,5), 0),
+ SR_AMU ("amevtyper114_el0", CPENC (3,3,C13,C15,6), 0),
+ SR_AMU ("amevtyper115_el0", CPENC (3,3,C13,C15,7), 0),
+
+ SR_GIC ("icc_pmr_el1", CPENC (3,0,C4,C6,0), 0),
+ SR_GIC ("icc_iar0_el1", CPENC (3,0,C12,C8,0), F_REG_READ),
+ SR_GIC ("icc_eoir0_el1", CPENC (3,0,C12,C8,1), F_REG_WRITE),
+ SR_GIC ("icc_hppir0_el1", CPENC (3,0,C12,C8,2), F_REG_READ),
+ SR_GIC ("icc_bpr0_el1", CPENC (3,0,C12,C8,3), 0),
+ SR_GIC ("icc_ap0r0_el1", CPENC (3,0,C12,C8,4), 0),
+ SR_GIC ("icc_ap0r1_el1", CPENC (3,0,C12,C8,5), 0),
+ SR_GIC ("icc_ap0r2_el1", CPENC (3,0,C12,C8,6), 0),
+ SR_GIC ("icc_ap0r3_el1", CPENC (3,0,C12,C8,7), 0),
+ SR_GIC ("icc_ap1r0_el1", CPENC (3,0,C12,C9,0), 0),
+ SR_GIC ("icc_ap1r1_el1", CPENC (3,0,C12,C9,1), 0),
+ SR_GIC ("icc_ap1r2_el1", CPENC (3,0,C12,C9,2), 0),
+ SR_GIC ("icc_ap1r3_el1", CPENC (3,0,C12,C9,3), 0),
+ SR_GIC ("icc_dir_el1", CPENC (3,0,C12,C11,1), F_REG_WRITE),
+ SR_GIC ("icc_rpr_el1", CPENC (3,0,C12,C11,3), F_REG_READ),
+ SR_GIC ("icc_sgi1r_el1", CPENC (3,0,C12,C11,5), F_REG_WRITE),
+ SR_GIC ("icc_asgi1r_el1", CPENC (3,0,C12,C11,6), F_REG_WRITE),
+ SR_GIC ("icc_sgi0r_el1", CPENC (3,0,C12,C11,7), F_REG_WRITE),
+ SR_GIC ("icc_iar1_el1", CPENC (3,0,C12,C12,0), F_REG_READ),
+ SR_GIC ("icc_eoir1_el1", CPENC (3,0,C12,C12,1), F_REG_WRITE),
+ SR_GIC ("icc_hppir1_el1", CPENC (3,0,C12,C12,2), F_REG_READ),
+ SR_GIC ("icc_bpr1_el1", CPENC (3,0,C12,C12,3), 0),
+ SR_GIC ("icc_ctlr_el1", CPENC (3,0,C12,C12,4), 0),
+ SR_GIC ("icc_igrpen0_el1", CPENC (3,0,C12,C12,6), 0),
+ SR_GIC ("icc_igrpen1_el1", CPENC (3,0,C12,C12,7), 0),
+ SR_GIC ("ich_ap0r0_el2", CPENC (3,4,C12,C8,0), 0),
+ SR_GIC ("ich_ap0r1_el2", CPENC (3,4,C12,C8,1), 0),
+ SR_GIC ("ich_ap0r2_el2", CPENC (3,4,C12,C8,2), 0),
+ SR_GIC ("ich_ap0r3_el2", CPENC (3,4,C12,C8,3), 0),
+ SR_GIC ("ich_ap1r0_el2", CPENC (3,4,C12,C9,0), 0),
+ SR_GIC ("ich_ap1r1_el2", CPENC (3,4,C12,C9,1), 0),
+ SR_GIC ("ich_ap1r2_el2", CPENC (3,4,C12,C9,2), 0),
+ SR_GIC ("ich_ap1r3_el2", CPENC (3,4,C12,C9,3), 0),
+ SR_GIC ("ich_hcr_el2", CPENC (3,4,C12,C11,0), 0),
+ SR_GIC ("ich_misr_el2", CPENC (3,4,C12,C11,2), F_REG_READ),
+ SR_GIC ("ich_eisr_el2", CPENC (3,4,C12,C11,3), F_REG_READ),
+ SR_GIC ("ich_elrsr_el2", CPENC (3,4,C12,C11,5), F_REG_READ),
+ SR_GIC ("ich_vmcr_el2", CPENC (3,4,C12,C11,7), 0),
+ SR_GIC ("ich_lr0_el2", CPENC (3,4,C12,C12,0), 0),
+ SR_GIC ("ich_lr1_el2", CPENC (3,4,C12,C12,1), 0),
+ SR_GIC ("ich_lr2_el2", CPENC (3,4,C12,C12,2), 0),
+ SR_GIC ("ich_lr3_el2", CPENC (3,4,C12,C12,3), 0),
+ SR_GIC ("ich_lr4_el2", CPENC (3,4,C12,C12,4), 0),
+ SR_GIC ("ich_lr5_el2", CPENC (3,4,C12,C12,5), 0),
+ SR_GIC ("ich_lr6_el2", CPENC (3,4,C12,C12,6), 0),
+ SR_GIC ("ich_lr7_el2", CPENC (3,4,C12,C12,7), 0),
+ SR_GIC ("ich_lr8_el2", CPENC (3,4,C12,C13,0), 0),
+ SR_GIC ("ich_lr9_el2", CPENC (3,4,C12,C13,1), 0),
+ SR_GIC ("ich_lr10_el2", CPENC (3,4,C12,C13,2), 0),
+ SR_GIC ("ich_lr11_el2", CPENC (3,4,C12,C13,3), 0),
+ SR_GIC ("ich_lr12_el2", CPENC (3,4,C12,C13,4), 0),
+ SR_GIC ("ich_lr13_el2", CPENC (3,4,C12,C13,5), 0),
+ SR_GIC ("ich_lr14_el2", CPENC (3,4,C12,C13,6), 0),
+ SR_GIC ("ich_lr15_el2", CPENC (3,4,C12,C13,7), 0),
+ SR_GIC ("icc_igrpen1_el3", CPENC (3,6,C12,C12,7), 0),
+
+ SR_V8_6 ("amcg1idr_el0", CPENC (3,3,C13,C2,6), F_REG_READ),
+ SR_V8_6 ("cntpctss_el0", CPENC (3,3,C14,C0,5), F_REG_READ),
+ SR_V8_6 ("cntvctss_el0", CPENC (3,3,C14,C0,6), F_REG_READ),
+ SR_V8_6 ("hfgrtr_el2", CPENC (3,4,C1,C1,4), 0),
+ SR_V8_6 ("hfgwtr_el2", CPENC (3,4,C1,C1,5), 0),
+ SR_V8_6 ("hfgitr_el2", CPENC (3,4,C1,C1,6), 0),
+ SR_V8_6 ("hdfgrtr_el2", CPENC (3,4,C3,C1,4), 0),
+ SR_V8_6 ("hdfgwtr_el2", CPENC (3,4,C3,C1,5), 0),
+ SR_V8_6 ("hafgrtr_el2", CPENC (3,4,C3,C1,6), 0),
+ SR_V8_6 ("amevcntvoff00_el2", CPENC (3,4,C13,C8,0), 0),
+ SR_V8_6 ("amevcntvoff01_el2", CPENC (3,4,C13,C8,1), 0),
+ SR_V8_6 ("amevcntvoff02_el2", CPENC (3,4,C13,C8,2), 0),
+ SR_V8_6 ("amevcntvoff03_el2", CPENC (3,4,C13,C8,3), 0),
+ SR_V8_6 ("amevcntvoff04_el2", CPENC (3,4,C13,C8,4), 0),
+ SR_V8_6 ("amevcntvoff05_el2", CPENC (3,4,C13,C8,5), 0),
+ SR_V8_6 ("amevcntvoff06_el2", CPENC (3,4,C13,C8,6), 0),
+ SR_V8_6 ("amevcntvoff07_el2", CPENC (3,4,C13,C8,7), 0),
+ SR_V8_6 ("amevcntvoff08_el2", CPENC (3,4,C13,C9,0), 0),
+ SR_V8_6 ("amevcntvoff09_el2", CPENC (3,4,C13,C9,1), 0),
+ SR_V8_6 ("amevcntvoff010_el2", CPENC (3,4,C13,C9,2), 0),
+ SR_V8_6 ("amevcntvoff011_el2", CPENC (3,4,C13,C9,3), 0),
+ SR_V8_6 ("amevcntvoff012_el2", CPENC (3,4,C13,C9,4), 0),
+ SR_V8_6 ("amevcntvoff013_el2", CPENC (3,4,C13,C9,5), 0),
+ SR_V8_6 ("amevcntvoff014_el2", CPENC (3,4,C13,C9,6), 0),
+ SR_V8_6 ("amevcntvoff015_el2", CPENC (3,4,C13,C9,7), 0),
+ SR_V8_6 ("amevcntvoff10_el2", CPENC (3,4,C13,C10,0), 0),
+ SR_V8_6 ("amevcntvoff11_el2", CPENC (3,4,C13,C10,1), 0),
+ SR_V8_6 ("amevcntvoff12_el2", CPENC (3,4,C13,C10,2), 0),
+ SR_V8_6 ("amevcntvoff13_el2", CPENC (3,4,C13,C10,3), 0),
+ SR_V8_6 ("amevcntvoff14_el2", CPENC (3,4,C13,C10,4), 0),
+ SR_V8_6 ("amevcntvoff15_el2", CPENC (3,4,C13,C10,5), 0),
+ SR_V8_6 ("amevcntvoff16_el2", CPENC (3,4,C13,C10,6), 0),
+ SR_V8_6 ("amevcntvoff17_el2", CPENC (3,4,C13,C10,7), 0),
+ SR_V8_6 ("amevcntvoff18_el2", CPENC (3,4,C13,C11,0), 0),
+ SR_V8_6 ("amevcntvoff19_el2", CPENC (3,4,C13,C11,1), 0),
+ SR_V8_6 ("amevcntvoff110_el2", CPENC (3,4,C13,C11,2), 0),
+ SR_V8_6 ("amevcntvoff111_el2", CPENC (3,4,C13,C11,3), 0),
+ SR_V8_6 ("amevcntvoff112_el2", CPENC (3,4,C13,C11,4), 0),
+ SR_V8_6 ("amevcntvoff113_el2", CPENC (3,4,C13,C11,5), 0),
+ SR_V8_6 ("amevcntvoff114_el2", CPENC (3,4,C13,C11,6), 0),
+ SR_V8_6 ("amevcntvoff115_el2", CPENC (3,4,C13,C11,7), 0),
+ SR_V8_6 ("cntpoff_el2", CPENC (3,4,C14,C0,6), 0),
+
+ SR_V8_7 ("pmsnevfr_el1", CPENC (3,0,C9,C9,1), 0),
+ SR_V8_7 ("hcrx_el2", CPENC (3,4,C1,C2,2), 0),
+
{ 0, CPENC (0,0,0,0,0), 0, 0 }
};