// Copyright (c) 2026 Petr BalvĂ­n (https://petrbalvin.org) // SPDX-License-Identifier: BSD-3-Clause package asm // arm64 system registers and system-instruction aliases. // // The tables are transcribed from the data the Go toolchain itself carries // (cmd/internal/obj/arm64/sysRegEnc.go and the sysInstFields map of asm7.go), // which the ARM ARM defines: every system register is the packed field set // op0<<19 | op1<<16 | CRn<<12 | CRm<<8 | op2<<5, and the read/write flags are // the toolchain's own access classification. The encoding tables live here so // the encoder stays testable against the GOROOT testdata word for word. // a64SysReg is one system register: the packed encoding fields and the // directions the register supports. type a64SysReg struct { v uint32 read bool write bool } // a64SysRegs maps the system register names the toolchain knows to their // encodings. MRS reads 0xd5300000 | v | Rd and MSR writes // 0xd5100000 | v | Rt. var a64SysRegs = map[string]a64SysReg{ "ACTLR_EL1": a64SysReg{0x181020, true, true}, "AFSR0_EL1": a64SysReg{0x185100, true, true}, "AFSR1_EL1": a64SysReg{0x185120, true, true}, "AIDR_EL1": a64SysReg{0x1900e0, true, false}, "AMAIR_EL1": a64SysReg{0x18a300, true, true}, "AMCFGR_EL0": a64SysReg{0x1bd220, true, false}, "AMCGCR_EL0": a64SysReg{0x1bd240, true, false}, "AMCNTENCLR0_EL0": a64SysReg{0x1bd280, true, true}, "AMCNTENCLR1_EL0": a64SysReg{0x1bd300, true, true}, "AMCNTENSET0_EL0": a64SysReg{0x1bd2a0, true, true}, "AMCNTENSET1_EL0": a64SysReg{0x1bd320, true, true}, "AMCR_EL0": a64SysReg{0x1bd200, true, true}, "AMEVCNTR00_EL0": a64SysReg{0x1bd400, true, true}, "AMEVCNTR01_EL0": a64SysReg{0x1bd420, true, true}, "AMEVCNTR02_EL0": a64SysReg{0x1bd440, true, true}, "AMEVCNTR03_EL0": a64SysReg{0x1bd460, true, true}, "AMEVCNTR04_EL0": a64SysReg{0x1bd480, true, true}, "AMEVCNTR05_EL0": a64SysReg{0x1bd4a0, true, true}, "AMEVCNTR06_EL0": a64SysReg{0x1bd4c0, true, true}, "AMEVCNTR07_EL0": a64SysReg{0x1bd4e0, true, true}, "AMEVCNTR08_EL0": a64SysReg{0x1bd500, true, true}, "AMEVCNTR09_EL0": a64SysReg{0x1bd520, true, true}, "AMEVCNTR010_EL0": a64SysReg{0x1bd540, true, true}, "AMEVCNTR011_EL0": a64SysReg{0x1bd560, true, true}, "AMEVCNTR012_EL0": a64SysReg{0x1bd580, true, true}, "AMEVCNTR013_EL0": a64SysReg{0x1bd5a0, true, true}, "AMEVCNTR014_EL0": a64SysReg{0x1bd5c0, true, true}, "AMEVCNTR015_EL0": a64SysReg{0x1bd5e0, true, true}, "AMEVCNTR10_EL0": a64SysReg{0x1bdc00, true, true}, "AMEVCNTR11_EL0": a64SysReg{0x1bdc20, true, true}, "AMEVCNTR12_EL0": a64SysReg{0x1bdc40, true, true}, "AMEVCNTR13_EL0": a64SysReg{0x1bdc60, true, true}, "AMEVCNTR14_EL0": a64SysReg{0x1bdc80, true, true}, "AMEVCNTR15_EL0": a64SysReg{0x1bdca0, true, true}, "AMEVCNTR16_EL0": a64SysReg{0x1bdcc0, true, true}, "AMEVCNTR17_EL0": a64SysReg{0x1bdce0, true, true}, "AMEVCNTR18_EL0": a64SysReg{0x1bdd00, true, true}, "AMEVCNTR19_EL0": a64SysReg{0x1bdd20, true, true}, "AMEVCNTR110_EL0": a64SysReg{0x1bdd40, true, true}, "AMEVCNTR111_EL0": a64SysReg{0x1bdd60, true, true}, "AMEVCNTR112_EL0": a64SysReg{0x1bdd80, true, true}, "AMEVCNTR113_EL0": a64SysReg{0x1bdda0, true, true}, "AMEVCNTR114_EL0": a64SysReg{0x1bddc0, true, true}, "AMEVCNTR115_EL0": a64SysReg{0x1bdde0, true, true}, "AMEVTYPER00_EL0": a64SysReg{0x1bd600, true, false}, "AMEVTYPER01_EL0": a64SysReg{0x1bd620, true, false}, "AMEVTYPER02_EL0": a64SysReg{0x1bd640, true, false}, "AMEVTYPER03_EL0": a64SysReg{0x1bd660, true, false}, "AMEVTYPER04_EL0": a64SysReg{0x1bd680, true, false}, "AMEVTYPER05_EL0": a64SysReg{0x1bd6a0, true, false}, "AMEVTYPER06_EL0": a64SysReg{0x1bd6c0, true, false}, "AMEVTYPER07_EL0": a64SysReg{0x1bd6e0, true, false}, "AMEVTYPER08_EL0": a64SysReg{0x1bd700, true, false}, "AMEVTYPER09_EL0": a64SysReg{0x1bd720, true, false}, "AMEVTYPER010_EL0": a64SysReg{0x1bd740, true, false}, "AMEVTYPER011_EL0": a64SysReg{0x1bd760, true, false}, "AMEVTYPER012_EL0": a64SysReg{0x1bd780, true, false}, "AMEVTYPER013_EL0": a64SysReg{0x1bd7a0, true, false}, "AMEVTYPER014_EL0": a64SysReg{0x1bd7c0, true, false}, "AMEVTYPER015_EL0": a64SysReg{0x1bd7e0, true, false}, "AMEVTYPER10_EL0": a64SysReg{0x1bde00, true, true}, "AMEVTYPER11_EL0": a64SysReg{0x1bde20, true, true}, "AMEVTYPER12_EL0": a64SysReg{0x1bde40, true, true}, "AMEVTYPER13_EL0": a64SysReg{0x1bde60, true, true}, "AMEVTYPER14_EL0": a64SysReg{0x1bde80, true, true}, "AMEVTYPER15_EL0": a64SysReg{0x1bdea0, true, true}, "AMEVTYPER16_EL0": a64SysReg{0x1bdec0, true, true}, "AMEVTYPER17_EL0": a64SysReg{0x1bdee0, true, true}, "AMEVTYPER18_EL0": a64SysReg{0x1bdf00, true, true}, "AMEVTYPER19_EL0": a64SysReg{0x1bdf20, true, true}, "AMEVTYPER110_EL0": a64SysReg{0x1bdf40, true, true}, "AMEVTYPER111_EL0": a64SysReg{0x1bdf60, true, true}, "AMEVTYPER112_EL0": a64SysReg{0x1bdf80, true, true}, "AMEVTYPER113_EL0": a64SysReg{0x1bdfa0, true, true}, "AMEVTYPER114_EL0": a64SysReg{0x1bdfc0, true, true}, "AMEVTYPER115_EL0": a64SysReg{0x1bdfe0, true, true}, "AMUSERENR_EL0": a64SysReg{0x1bd260, true, true}, "APDAKeyHi_EL1": a64SysReg{0x182220, true, true}, "APDAKeyLo_EL1": a64SysReg{0x182200, true, true}, "APDBKeyHi_EL1": a64SysReg{0x182260, true, true}, "APDBKeyLo_EL1": a64SysReg{0x182240, true, true}, "APGAKeyHi_EL1": a64SysReg{0x182320, true, true}, "APGAKeyLo_EL1": a64SysReg{0x182300, true, true}, "APIAKeyHi_EL1": a64SysReg{0x182120, true, true}, "APIAKeyLo_EL1": a64SysReg{0x182100, true, true}, "APIBKeyHi_EL1": a64SysReg{0x182160, true, true}, "APIBKeyLo_EL1": a64SysReg{0x182140, true, true}, "CCSIDR2_EL1": a64SysReg{0x190040, true, false}, "CCSIDR_EL1": a64SysReg{0x190000, true, false}, "CLIDR_EL1": a64SysReg{0x190020, true, false}, "CNTFRQ_EL0": a64SysReg{0x1be000, true, true}, "CNTKCTL_EL1": a64SysReg{0x18e100, true, true}, "CNTP_CTL_EL0": a64SysReg{0x1be220, true, true}, "CNTP_CVAL_EL0": a64SysReg{0x1be240, true, true}, "CNTP_TVAL_EL0": a64SysReg{0x1be200, true, true}, "CNTPCT_EL0": a64SysReg{0x1be020, true, false}, "CNTPS_CTL_EL1": a64SysReg{0x1fe220, true, true}, "CNTPS_CVAL_EL1": a64SysReg{0x1fe240, true, true}, "CNTPS_TVAL_EL1": a64SysReg{0x1fe200, true, true}, "CNTV_CTL_EL0": a64SysReg{0x1be320, true, true}, "CNTV_CVAL_EL0": a64SysReg{0x1be340, true, true}, "CNTV_TVAL_EL0": a64SysReg{0x1be300, true, true}, "CNTVCT_EL0": a64SysReg{0x1be040, true, false}, "CONTEXTIDR_EL1": a64SysReg{0x18d020, true, true}, "CPACR_EL1": a64SysReg{0x181040, true, true}, "CSSELR_EL1": a64SysReg{0x1a0000, true, true}, "CTR_EL0": a64SysReg{0x1b0020, true, false}, "CurrentEL": a64SysReg{0x184240, true, false}, "DAIF": a64SysReg{0x1b4220, true, true}, "DBGAUTHSTATUS_EL1": a64SysReg{0x107ec0, true, false}, "DBGBCR0_EL1": a64SysReg{0x1000a0, true, true}, "DBGBCR1_EL1": a64SysReg{0x1001a0, true, true}, "DBGBCR2_EL1": a64SysReg{0x1002a0, true, true}, "DBGBCR3_EL1": a64SysReg{0x1003a0, true, true}, "DBGBCR4_EL1": a64SysReg{0x1004a0, true, true}, "DBGBCR5_EL1": a64SysReg{0x1005a0, true, true}, "DBGBCR6_EL1": a64SysReg{0x1006a0, true, true}, "DBGBCR7_EL1": a64SysReg{0x1007a0, true, true}, "DBGBCR8_EL1": a64SysReg{0x1008a0, true, true}, "DBGBCR9_EL1": a64SysReg{0x1009a0, true, true}, "DBGBCR10_EL1": a64SysReg{0x100aa0, true, true}, "DBGBCR11_EL1": a64SysReg{0x100ba0, true, true}, "DBGBCR12_EL1": a64SysReg{0x100ca0, true, true}, "DBGBCR13_EL1": a64SysReg{0x100da0, true, true}, "DBGBCR14_EL1": a64SysReg{0x100ea0, true, true}, "DBGBCR15_EL1": a64SysReg{0x100fa0, true, true}, "DBGBVR0_EL1": a64SysReg{0x100080, true, true}, "DBGBVR1_EL1": a64SysReg{0x100180, true, true}, "DBGBVR2_EL1": a64SysReg{0x100280, true, true}, "DBGBVR3_EL1": a64SysReg{0x100380, true, true}, "DBGBVR4_EL1": a64SysReg{0x100480, true, true}, "DBGBVR5_EL1": a64SysReg{0x100580, true, true}, "DBGBVR6_EL1": a64SysReg{0x100680, true, true}, "DBGBVR7_EL1": a64SysReg{0x100780, true, true}, "DBGBVR8_EL1": a64SysReg{0x100880, true, true}, "DBGBVR9_EL1": a64SysReg{0x100980, true, true}, "DBGBVR10_EL1": a64SysReg{0x100a80, true, true}, "DBGBVR11_EL1": a64SysReg{0x100b80, true, true}, "DBGBVR12_EL1": a64SysReg{0x100c80, true, true}, "DBGBVR13_EL1": a64SysReg{0x100d80, true, true}, "DBGBVR14_EL1": a64SysReg{0x100e80, true, true}, "DBGBVR15_EL1": a64SysReg{0x100f80, true, true}, "DBGCLAIMCLR_EL1": a64SysReg{0x1079c0, true, true}, "DBGCLAIMSET_EL1": a64SysReg{0x1078c0, true, true}, "DBGDTR_EL0": a64SysReg{0x130400, true, true}, "DBGDTRRX_EL0": a64SysReg{0x130500, true, false}, "DBGDTRTX_EL0": a64SysReg{0x130500, false, true}, "DBGPRCR_EL1": a64SysReg{0x101480, true, true}, "DBGWCR0_EL1": a64SysReg{0x1000e0, true, true}, "DBGWCR1_EL1": a64SysReg{0x1001e0, true, true}, "DBGWCR2_EL1": a64SysReg{0x1002e0, true, true}, "DBGWCR3_EL1": a64SysReg{0x1003e0, true, true}, "DBGWCR4_EL1": a64SysReg{0x1004e0, true, true}, "DBGWCR5_EL1": a64SysReg{0x1005e0, true, true}, "DBGWCR6_EL1": a64SysReg{0x1006e0, true, true}, "DBGWCR7_EL1": a64SysReg{0x1007e0, true, true}, "DBGWCR8_EL1": a64SysReg{0x1008e0, true, true}, "DBGWCR9_EL1": a64SysReg{0x1009e0, true, true}, "DBGWCR10_EL1": a64SysReg{0x100ae0, true, true}, "DBGWCR11_EL1": a64SysReg{0x100be0, true, true}, "DBGWCR12_EL1": a64SysReg{0x100ce0, true, true}, "DBGWCR13_EL1": a64SysReg{0x100de0, true, true}, "DBGWCR14_EL1": a64SysReg{0x100ee0, true, true}, "DBGWCR15_EL1": a64SysReg{0x100fe0, true, true}, "DBGWVR0_EL1": a64SysReg{0x1000c0, true, true}, "DBGWVR1_EL1": a64SysReg{0x1001c0, true, true}, "DBGWVR2_EL1": a64SysReg{0x1002c0, true, true}, "DBGWVR3_EL1": a64SysReg{0x1003c0, true, true}, "DBGWVR4_EL1": a64SysReg{0x1004c0, true, true}, "DBGWVR5_EL1": a64SysReg{0x1005c0, true, true}, "DBGWVR6_EL1": a64SysReg{0x1006c0, true, true}, "DBGWVR7_EL1": a64SysReg{0x1007c0, true, true}, "DBGWVR8_EL1": a64SysReg{0x1008c0, true, true}, "DBGWVR9_EL1": a64SysReg{0x1009c0, true, true}, "DBGWVR10_EL1": a64SysReg{0x100ac0, true, true}, "DBGWVR11_EL1": a64SysReg{0x100bc0, true, true}, "DBGWVR12_EL1": a64SysReg{0x100cc0, true, true}, "DBGWVR13_EL1": a64SysReg{0x100dc0, true, true}, "DBGWVR14_EL1": a64SysReg{0x100ec0, true, true}, "DBGWVR15_EL1": a64SysReg{0x100fc0, true, true}, "DCZID_EL0": a64SysReg{0x1b00e0, true, false}, "DISR_EL1": a64SysReg{0x18c120, true, true}, "DIT": a64SysReg{0x1b42a0, true, true}, "DLR_EL0": a64SysReg{0x1b4520, true, true}, "DSPSR_EL0": a64SysReg{0x1b4500, true, true}, "ELR_EL1": a64SysReg{0x184020, true, true}, "ERRIDR_EL1": a64SysReg{0x185300, true, false}, "ERRSELR_EL1": a64SysReg{0x185320, true, true}, "ERXADDR_EL1": a64SysReg{0x185460, true, true}, "ERXCTLR_EL1": a64SysReg{0x185420, true, true}, "ERXFR_EL1": a64SysReg{0x185400, true, false}, "ERXMISC0_EL1": a64SysReg{0x185500, true, true}, "ERXMISC1_EL1": a64SysReg{0x185520, true, true}, "ERXMISC2_EL1": a64SysReg{0x185540, true, true}, "ERXMISC3_EL1": a64SysReg{0x185560, true, true}, "ERXPFGCDN_EL1": a64SysReg{0x1854c0, true, true}, "ERXPFGCTL_EL1": a64SysReg{0x1854a0, true, true}, "ERXPFGF_EL1": a64SysReg{0x185480, true, false}, "ERXSTATUS_EL1": a64SysReg{0x185440, true, true}, "ESR_EL1": a64SysReg{0x185200, true, true}, "FAR_EL1": a64SysReg{0x186000, true, true}, "FPCR": a64SysReg{0x1b4400, true, true}, "FPSR": a64SysReg{0x1b4420, true, true}, "GCR_EL1": a64SysReg{0x1810c0, true, true}, "GMID_EL1": a64SysReg{0x31400, true, false}, "ICC_AP0R0_EL1": a64SysReg{0x18c880, true, true}, "ICC_AP0R1_EL1": a64SysReg{0x18c8a0, true, true}, "ICC_AP0R2_EL1": a64SysReg{0x18c8c0, true, true}, "ICC_AP0R3_EL1": a64SysReg{0x18c8e0, true, true}, "ICC_AP1R0_EL1": a64SysReg{0x18c900, true, true}, "ICC_AP1R1_EL1": a64SysReg{0x18c920, true, true}, "ICC_AP1R2_EL1": a64SysReg{0x18c940, true, true}, "ICC_AP1R3_EL1": a64SysReg{0x18c960, true, true}, "ICC_ASGI1R_EL1": a64SysReg{0x18cbc0, false, true}, "ICC_BPR0_EL1": a64SysReg{0x18c860, true, true}, "ICC_BPR1_EL1": a64SysReg{0x18cc60, true, true}, "ICC_CTLR_EL1": a64SysReg{0x18cc80, true, true}, "ICC_DIR_EL1": a64SysReg{0x18cb20, false, true}, "ICC_EOIR0_EL1": a64SysReg{0x18c820, false, true}, "ICC_EOIR1_EL1": a64SysReg{0x18cc20, false, true}, "ICC_HPPIR0_EL1": a64SysReg{0x18c840, true, false}, "ICC_HPPIR1_EL1": a64SysReg{0x18cc40, true, false}, "ICC_IAR0_EL1": a64SysReg{0x18c800, true, false}, "ICC_IAR1_EL1": a64SysReg{0x18cc00, true, false}, "ICC_IGRPEN0_EL1": a64SysReg{0x18ccc0, true, true}, "ICC_IGRPEN1_EL1": a64SysReg{0x18cce0, true, true}, "ICC_PMR_EL1": a64SysReg{0x184600, true, true}, "ICC_RPR_EL1": a64SysReg{0x18cb60, true, false}, "ICC_SGI0R_EL1": a64SysReg{0x18cbe0, false, true}, "ICC_SGI1R_EL1": a64SysReg{0x18cba0, false, true}, "ICC_SRE_EL1": a64SysReg{0x18cca0, true, true}, "ICV_AP0R0_EL1": a64SysReg{0x18c880, true, true}, "ICV_AP0R1_EL1": a64SysReg{0x18c8a0, true, true}, "ICV_AP0R2_EL1": a64SysReg{0x18c8c0, true, true}, "ICV_AP0R3_EL1": a64SysReg{0x18c8e0, true, true}, "ICV_AP1R0_EL1": a64SysReg{0x18c900, true, true}, "ICV_AP1R1_EL1": a64SysReg{0x18c920, true, true}, "ICV_AP1R2_EL1": a64SysReg{0x18c940, true, true}, "ICV_AP1R3_EL1": a64SysReg{0x18c960, true, true}, "ICV_BPR0_EL1": a64SysReg{0x18c860, true, true}, "ICV_BPR1_EL1": a64SysReg{0x18cc60, true, true}, "ICV_CTLR_EL1": a64SysReg{0x18cc80, true, true}, "ICV_DIR_EL1": a64SysReg{0x18cb20, false, true}, "ICV_EOIR0_EL1": a64SysReg{0x18c820, false, true}, "ICV_EOIR1_EL1": a64SysReg{0x18cc20, false, true}, "ICV_HPPIR0_EL1": a64SysReg{0x18c840, true, false}, "ICV_HPPIR1_EL1": a64SysReg{0x18cc40, true, false}, "ICV_IAR0_EL1": a64SysReg{0x18c800, true, false}, "ICV_IAR1_EL1": a64SysReg{0x18cc00, true, false}, "ICV_IGRPEN0_EL1": a64SysReg{0x18ccc0, true, true}, "ICV_IGRPEN1_EL1": a64SysReg{0x18cce0, true, true}, "ICV_PMR_EL1": a64SysReg{0x184600, true, true}, "ICV_RPR_EL1": a64SysReg{0x18cb60, true, false}, "ID_AA64AFR0_EL1": a64SysReg{0x180580, true, false}, "ID_AA64AFR1_EL1": a64SysReg{0x1805a0, true, false}, "ID_AA64DFR0_EL1": a64SysReg{0x180500, true, false}, "ID_AA64DFR1_EL1": a64SysReg{0x180520, true, false}, "ID_AA64ISAR0_EL1": a64SysReg{0x180600, true, false}, "ID_AA64ISAR1_EL1": a64SysReg{0x180620, true, false}, "ID_AA64MMFR0_EL1": a64SysReg{0x180700, true, false}, "ID_AA64MMFR1_EL1": a64SysReg{0x180720, true, false}, "ID_AA64MMFR2_EL1": a64SysReg{0x180740, true, false}, "ID_AA64PFR0_EL1": a64SysReg{0x180400, true, false}, "ID_AA64PFR1_EL1": a64SysReg{0x180420, true, false}, "ID_AA64ZFR0_EL1": a64SysReg{0x180480, true, false}, "ID_AFR0_EL1": a64SysReg{0x180160, true, false}, "ID_DFR0_EL1": a64SysReg{0x180140, true, false}, "ID_ISAR0_EL1": a64SysReg{0x180200, true, false}, "ID_ISAR1_EL1": a64SysReg{0x180220, true, false}, "ID_ISAR2_EL1": a64SysReg{0x180240, true, false}, "ID_ISAR3_EL1": a64SysReg{0x180260, true, false}, "ID_ISAR4_EL1": a64SysReg{0x180280, true, false}, "ID_ISAR5_EL1": a64SysReg{0x1802a0, true, false}, "ID_ISAR6_EL1": a64SysReg{0x1802e0, true, false}, "ID_MMFR0_EL1": a64SysReg{0x180180, true, false}, "ID_MMFR1_EL1": a64SysReg{0x1801a0, true, false}, "ID_MMFR2_EL1": a64SysReg{0x1801c0, true, false}, "ID_MMFR3_EL1": a64SysReg{0x1801e0, true, false}, "ID_MMFR4_EL1": a64SysReg{0x1802c0, true, false}, "ID_PFR0_EL1": a64SysReg{0x180100, true, false}, "ID_PFR1_EL1": a64SysReg{0x180120, true, false}, "ID_PFR2_EL1": a64SysReg{0x180380, true, false}, "ISR_EL1": a64SysReg{0x18c100, true, false}, "LORC_EL1": a64SysReg{0x18a460, true, true}, "LOREA_EL1": a64SysReg{0x18a420, true, true}, "LORID_EL1": a64SysReg{0x18a4e0, true, false}, "LORN_EL1": a64SysReg{0x18a440, true, true}, "LORSA_EL1": a64SysReg{0x18a400, true, true}, "MAIR_EL1": a64SysReg{0x18a200, true, true}, "MDCCINT_EL1": a64SysReg{0x100200, true, true}, "MDCCSR_EL0": a64SysReg{0x130100, true, false}, "MDRAR_EL1": a64SysReg{0x101000, true, false}, "MDSCR_EL1": a64SysReg{0x100240, true, true}, "MIDR_EL1": a64SysReg{0x180000, true, false}, "MPAM0_EL1": a64SysReg{0x18a520, true, true}, "MPAM1_EL1": a64SysReg{0x18a500, true, true}, "MPAMIDR_EL1": a64SysReg{0x18a480, true, false}, "MPIDR_EL1": a64SysReg{0x1800a0, true, false}, "MVFR0_EL1": a64SysReg{0x180300, true, false}, "MVFR1_EL1": a64SysReg{0x180320, true, false}, "MVFR2_EL1": a64SysReg{0x180340, true, false}, "NZCV": a64SysReg{0x1b4200, true, true}, "OSDLR_EL1": a64SysReg{0x101380, true, true}, "OSDTRRX_EL1": a64SysReg{0x100040, true, true}, "OSDTRTX_EL1": a64SysReg{0x100340, true, true}, "OSECCR_EL1": a64SysReg{0x100640, true, true}, "OSLAR_EL1": a64SysReg{0x101080, false, true}, "OSLSR_EL1": a64SysReg{0x101180, true, false}, "PAN": a64SysReg{0x184260, true, true}, "PAR_EL1": a64SysReg{0x187400, true, true}, "PMBIDR_EL1": a64SysReg{0x189ae0, true, false}, "PMBLIMITR_EL1": a64SysReg{0x189a00, true, true}, "PMBPTR_EL1": a64SysReg{0x189a20, true, true}, "PMBSR_EL1": a64SysReg{0x189a60, true, true}, "PMCCFILTR_EL0": a64SysReg{0x1befe0, true, true}, "PMCCNTR_EL0": a64SysReg{0x1b9d00, true, true}, "PMCEID0_EL0": a64SysReg{0x1b9cc0, true, false}, "PMCEID1_EL0": a64SysReg{0x1b9ce0, true, false}, "PMCNTENCLR_EL0": a64SysReg{0x1b9c40, true, true}, "PMCNTENSET_EL0": a64SysReg{0x1b9c20, true, true}, "PMCR_EL0": a64SysReg{0x1b9c00, true, true}, "PMEVCNTR0_EL0": a64SysReg{0x1be800, true, true}, "PMEVCNTR1_EL0": a64SysReg{0x1be820, true, true}, "PMEVCNTR2_EL0": a64SysReg{0x1be840, true, true}, "PMEVCNTR3_EL0": a64SysReg{0x1be860, true, true}, "PMEVCNTR4_EL0": a64SysReg{0x1be880, true, true}, "PMEVCNTR5_EL0": a64SysReg{0x1be8a0, true, true}, "PMEVCNTR6_EL0": a64SysReg{0x1be8c0, true, true}, "PMEVCNTR7_EL0": a64SysReg{0x1be8e0, true, true}, "PMEVCNTR8_EL0": a64SysReg{0x1be900, true, true}, "PMEVCNTR9_EL0": a64SysReg{0x1be920, true, true}, "PMEVCNTR10_EL0": a64SysReg{0x1be940, true, true}, "PMEVCNTR11_EL0": a64SysReg{0x1be960, true, true}, "PMEVCNTR12_EL0": a64SysReg{0x1be980, true, true}, "PMEVCNTR13_EL0": a64SysReg{0x1be9a0, true, true}, "PMEVCNTR14_EL0": a64SysReg{0x1be9c0, true, true}, "PMEVCNTR15_EL0": a64SysReg{0x1be9e0, true, true}, "PMEVCNTR16_EL0": a64SysReg{0x1bea00, true, true}, "PMEVCNTR17_EL0": a64SysReg{0x1bea20, true, true}, "PMEVCNTR18_EL0": a64SysReg{0x1bea40, true, true}, "PMEVCNTR19_EL0": a64SysReg{0x1bea60, true, true}, "PMEVCNTR20_EL0": a64SysReg{0x1bea80, true, true}, "PMEVCNTR21_EL0": a64SysReg{0x1beaa0, true, true}, "PMEVCNTR22_EL0": a64SysReg{0x1beac0, true, true}, "PMEVCNTR23_EL0": a64SysReg{0x1beae0, true, true}, "PMEVCNTR24_EL0": a64SysReg{0x1beb00, true, true}, "PMEVCNTR25_EL0": a64SysReg{0x1beb20, true, true}, "PMEVCNTR26_EL0": a64SysReg{0x1beb40, true, true}, "PMEVCNTR27_EL0": a64SysReg{0x1beb60, true, true}, "PMEVCNTR28_EL0": a64SysReg{0x1beb80, true, true}, "PMEVCNTR29_EL0": a64SysReg{0x1beba0, true, true}, "PMEVCNTR30_EL0": a64SysReg{0x1bebc0, true, true}, "PMEVTYPER0_EL0": a64SysReg{0x1bec00, true, true}, "PMEVTYPER1_EL0": a64SysReg{0x1bec20, true, true}, "PMEVTYPER2_EL0": a64SysReg{0x1bec40, true, true}, "PMEVTYPER3_EL0": a64SysReg{0x1bec60, true, true}, "PMEVTYPER4_EL0": a64SysReg{0x1bec80, true, true}, "PMEVTYPER5_EL0": a64SysReg{0x1beca0, true, true}, "PMEVTYPER6_EL0": a64SysReg{0x1becc0, true, true}, "PMEVTYPER7_EL0": a64SysReg{0x1bece0, true, true}, "PMEVTYPER8_EL0": a64SysReg{0x1bed00, true, true}, "PMEVTYPER9_EL0": a64SysReg{0x1bed20, true, true}, "PMEVTYPER10_EL0": a64SysReg{0x1bed40, true, true}, "PMEVTYPER11_EL0": a64SysReg{0x1bed60, true, true}, "PMEVTYPER12_EL0": a64SysReg{0x1bed80, true, true}, "PMEVTYPER13_EL0": a64SysReg{0x1beda0, true, true}, "PMEVTYPER14_EL0": a64SysReg{0x1bedc0, true, true}, "PMEVTYPER15_EL0": a64SysReg{0x1bede0, true, true}, "PMEVTYPER16_EL0": a64SysReg{0x1bee00, true, true}, "PMEVTYPER17_EL0": a64SysReg{0x1bee20, true, true}, "PMEVTYPER18_EL0": a64SysReg{0x1bee40, true, true}, "PMEVTYPER19_EL0": a64SysReg{0x1bee60, true, true}, "PMEVTYPER20_EL0": a64SysReg{0x1bee80, true, true}, "PMEVTYPER21_EL0": a64SysReg{0x1beea0, true, true}, "PMEVTYPER22_EL0": a64SysReg{0x1beec0, true, true}, "PMEVTYPER23_EL0": a64SysReg{0x1beee0, true, true}, "PMEVTYPER24_EL0": a64SysReg{0x1bef00, true, true}, "PMEVTYPER25_EL0": a64SysReg{0x1bef20, true, true}, "PMEVTYPER26_EL0": a64SysReg{0x1bef40, true, true}, "PMEVTYPER27_EL0": a64SysReg{0x1bef60, true, true}, "PMEVTYPER28_EL0": a64SysReg{0x1bef80, true, true}, "PMEVTYPER29_EL0": a64SysReg{0x1befa0, true, true}, "PMEVTYPER30_EL0": a64SysReg{0x1befc0, true, true}, "PMINTENCLR_EL1": a64SysReg{0x189e40, true, true}, "PMINTENSET_EL1": a64SysReg{0x189e20, true, true}, "PMMIR_EL1": a64SysReg{0x189ec0, true, false}, "PMOVSCLR_EL0": a64SysReg{0x1b9c60, true, true}, "PMOVSSET_EL0": a64SysReg{0x1b9e60, true, true}, "PMSCR_EL1": a64SysReg{0x189900, true, true}, "PMSELR_EL0": a64SysReg{0x1b9ca0, true, true}, "PMSEVFR_EL1": a64SysReg{0x1899a0, true, true}, "PMSFCR_EL1": a64SysReg{0x189980, true, true}, "PMSICR_EL1": a64SysReg{0x189940, true, true}, "PMSIDR_EL1": a64SysReg{0x1899e0, true, false}, "PMSIRR_EL1": a64SysReg{0x189960, true, true}, "PMSLATFR_EL1": a64SysReg{0x1899c0, true, true}, "PMSWINC_EL0": a64SysReg{0x1b9c80, false, true}, "PMUSERENR_EL0": a64SysReg{0x1b9e00, true, true}, "PMXEVCNTR_EL0": a64SysReg{0x1b9d40, true, true}, "PMXEVTYPER_EL0": a64SysReg{0x1b9d20, true, true}, "REVIDR_EL1": a64SysReg{0x1800c0, true, false}, "RGSR_EL1": a64SysReg{0x1810a0, true, true}, "RMR_EL1": a64SysReg{0x18c040, true, true}, "RNDR": a64SysReg{0x1b2400, true, false}, "RNDRRS": a64SysReg{0x1b2420, true, false}, "RVBAR_EL1": a64SysReg{0x18c020, true, false}, "SCTLR_EL1": a64SysReg{0x181000, true, true}, "SCXTNUM_EL0": a64SysReg{0x1bd0e0, true, true}, "SCXTNUM_EL1": a64SysReg{0x18d0e0, true, true}, "SP_EL0": a64SysReg{0x184100, true, true}, "SP_EL1": a64SysReg{0x1c4100, true, true}, "SPSel": a64SysReg{0x184200, true, true}, "SPSR_abt": a64SysReg{0x1c4320, true, true}, "SPSR_EL1": a64SysReg{0x184000, true, true}, "SPSR_fiq": a64SysReg{0x1c4360, true, true}, "SPSR_irq": a64SysReg{0x1c4300, true, true}, "SPSR_und": a64SysReg{0x1c4340, true, true}, "SSBS": a64SysReg{0x1b42c0, true, true}, "TCO": a64SysReg{0x1b42e0, true, true}, "TCR_EL1": a64SysReg{0x182040, true, true}, "TFSR_EL1": a64SysReg{0x185600, true, true}, "TFSRE0_EL1": a64SysReg{0x185620, true, true}, "TPIDR_EL0": a64SysReg{0x1bd040, true, true}, "TPIDR_EL1": a64SysReg{0x18d080, true, true}, "TPIDRRO_EL0": a64SysReg{0x1bd060, true, true}, "TRFCR_EL1": a64SysReg{0x181220, true, true}, "TTBR0_EL1": a64SysReg{0x182000, true, true}, "TTBR1_EL1": a64SysReg{0x182020, true, true}, "UAO": a64SysReg{0x184280, true, true}, "VBAR_EL1": a64SysReg{0x18c000, true, true}, "ZCR_EL1": a64SysReg{0x181200, true, true}, } // a64SysInst is one TLBI alias: the fields the SYS encoding carries beside // the fixed op0 = 01 and CRn = 8. type a64SysInst struct { op1, cm, op2 uint32 } // a64TLBIOps maps the TLBI operation names to their fields; the register // operand is optional and defaults to ZR. var a64TLBIOps = map[string]a64SysInst{ "ALLE1": {0x4, 0x7, 0x4}, "ALLE1IS": {0x4, 0x3, 0x4}, "ALLE1OS": {0x4, 0x1, 0x4}, "ALLE2": {0x4, 0x7, 0x0}, "ALLE2IS": {0x4, 0x3, 0x0}, "ALLE2OS": {0x4, 0x1, 0x0}, "ALLE3": {0x6, 0x7, 0x0}, "ALLE3IS": {0x6, 0x3, 0x0}, "ALLE3OS": {0x6, 0x1, 0x0}, "ASIDE1": {0x0, 0x7, 0x2}, "ASIDE1IS": {0x0, 0x3, 0x2}, "ASIDE1OS": {0x0, 0x1, 0x2}, "IPAS2E1": {0x4, 0x4, 0x1}, "IPAS2E1IS": {0x4, 0x0, 0x1}, "IPAS2E1OS": {0x4, 0x4, 0x0}, "IPAS2LE1": {0x4, 0x4, 0x5}, "IPAS2LE1IS": {0x4, 0x0, 0x5}, "IPAS2LE1OS": {0x4, 0x4, 0x4}, "RIPAS2E1": {0x4, 0x4, 0x2}, "RIPAS2E1IS": {0x4, 0x0, 0x2}, "RIPAS2E1OS": {0x4, 0x4, 0x3}, "RIPAS2LE1": {0x4, 0x4, 0x6}, "RIPAS2LE1IS": {0x4, 0x0, 0x6}, "RIPAS2LE1OS": {0x4, 0x4, 0x7}, "RVAAE1": {0x0, 0x6, 0x3}, "RVAAE1IS": {0x0, 0x2, 0x3}, "RVAAE1OS": {0x0, 0x5, 0x3}, "RVAALE1": {0x0, 0x6, 0x7}, "RVAALE1IS": {0x0, 0x2, 0x7}, "RVAALE1OS": {0x0, 0x5, 0x7}, "RVAE1": {0x0, 0x6, 0x1}, "RVAE1IS": {0x0, 0x2, 0x1}, "RVAE1OS": {0x0, 0x5, 0x1}, "RVAE2": {0x4, 0x6, 0x1}, "RVAE2IS": {0x4, 0x2, 0x1}, "RVAE2OS": {0x4, 0x5, 0x1}, "RVAE3": {0x6, 0x6, 0x1}, "RVAE3IS": {0x6, 0x2, 0x1}, "RVAE3OS": {0x6, 0x5, 0x1}, "RVALE1": {0x0, 0x6, 0x5}, "RVALE1IS": {0x0, 0x2, 0x5}, "RVALE1OS": {0x0, 0x5, 0x5}, "RVALE2": {0x4, 0x6, 0x5}, "RVALE2IS": {0x4, 0x2, 0x5}, "RVALE2OS": {0x4, 0x5, 0x5}, "RVALE3": {0x6, 0x6, 0x5}, "RVALE3IS": {0x6, 0x2, 0x5}, "RVALE3OS": {0x6, 0x5, 0x5}, "VAAE1": {0x0, 0x7, 0x3}, "VAAE1IS": {0x0, 0x3, 0x3}, "VAAE1OS": {0x0, 0x1, 0x3}, "VAALE1": {0x0, 0x7, 0x7}, "VAALE1IS": {0x0, 0x3, 0x7}, "VAALE1OS": {0x0, 0x1, 0x7}, "VAE1": {0x0, 0x7, 0x1}, "VAE1IS": {0x0, 0x3, 0x1}, "VAE1OS": {0x0, 0x1, 0x1}, "VAE2": {0x4, 0x7, 0x1}, "VAE2IS": {0x4, 0x3, 0x1}, "VAE2OS": {0x4, 0x1, 0x1}, "VAE3": {0x6, 0x7, 0x1}, "VAE3IS": {0x6, 0x3, 0x1}, "VAE3OS": {0x6, 0x1, 0x1}, "VALE1": {0x0, 0x7, 0x5}, "VALE1IS": {0x0, 0x3, 0x5}, "VALE1OS": {0x0, 0x1, 0x5}, "VALE2": {0x4, 0x7, 0x5}, "VALE2IS": {0x4, 0x3, 0x5}, "VALE2OS": {0x4, 0x1, 0x5}, "VALE3": {0x6, 0x7, 0x5}, "VALE3IS": {0x6, 0x3, 0x5}, "VALE3OS": {0x6, 0x1, 0x5}, "VMALLE1": {0x0, 0x7, 0x0}, "VMALLE1IS": {0x0, 0x3, 0x0}, "VMALLE1OS": {0x0, 0x1, 0x0}, "VMALLS12E1": {0x4, 0x7, 0x6}, "VMALLS12E1IS": {0x4, 0x3, 0x6}, "VMALLS12E1OS": {0x4, 0x1, 0x6}, } // a64DCOps2 maps the DC operation names to their fields; the register // operand is mandatory. var a64DCOps2 = map[string]a64SysInst{ "CGDSW": {0x0, 0xa, 0x6}, "CGDVAC": {0x3, 0xa, 0x5}, "CGDVADP": {0x3, 0xd, 0x5}, "CGDVAP": {0x3, 0xc, 0x5}, "CGSW": {0x0, 0xa, 0x4}, "CGVAC": {0x3, 0xa, 0x3}, "CGVADP": {0x3, 0xd, 0x3}, "CGVAP": {0x3, 0xc, 0x3}, "CIGDSW": {0x0, 0xe, 0x6}, "CIGDVAC": {0x3, 0xe, 0x5}, "CIGSW": {0x0, 0xe, 0x4}, "CIGVAC": {0x3, 0xe, 0x3}, "CISW": {0x0, 0xe, 0x2}, "CIVAC": {0x3, 0xe, 0x1}, "CSW": {0x0, 0xa, 0x2}, "CVAC": {0x3, 0xa, 0x1}, "CVADP": {0x3, 0xd, 0x1}, "CVAP": {0x3, 0xc, 0x1}, "CVAU": {0x3, 0xb, 0x1}, "GVA": {0x3, 0x4, 0x3}, "GZVA": {0x3, 0x4, 0x4}, "IGDSW": {0x0, 0x6, 0x6}, "IGDVAC": {0x0, 0x6, 0x5}, "IGSW": {0x0, 0x6, 0x4}, "IGVAC": {0x0, 0x6, 0x3}, "ISW": {0x0, 0x6, 0x2}, "IVAC": {0x0, 0x6, 0x1}, "ZVA": {0x3, 0x4, 0x1}, } // a64RPRFOps maps the range-prefetch operation names to their 6-bit values. var a64RPRFOps = map[string]uint32{ "PLDKEEP": 0, "PLDSTRM": 4, "PSTKEEP": 1, "PSTSTRM": 5, }