Overview Why you should care about the ISA Instruction sets in the Arm architecture Instruction set resources Simple sequential execution Registers in AArch64 - general-purpose registers Registers in AArch64 - other registers Registers in AArch64 - system registers Data processing - arithmetic and logic operations Data processing - floating point Data processing - bit manipulation Data processing - extension and saturation Data processing - format conversion Data processing - vector data Loads and stores Loads and stores - size Loads and stores - zero and sign extension Loads and stores - addressing Loads and stores - load pair and store pair Loads and stores - using floating point registers Program flow Program flow - loops and decisions Program flow - generating condition code Program flow - conditional select instructions Function calls Procedure Call Standard System calls Check your knowledge Related information Next steps
System registers
As well as general purpose registers, the architecture defines system registers. System registers are used to configure the processor and to control systems such as the MMU and exception handling.
System registers cannot be used directly by data processing or load/store instructions. Instead, the contents of a system register need to be read into an X
register, operated on, and then written back to the system register. There are two specialist instructions for accessing system registers:
MRS Xd, <system register>
reads the system register into Xd.
MSR <system register>, Xn
write Xn
to the system register.
System registers are specified by name, for example SCTLR_EL1
:
MRS X0, SCTLR_EL1
reads SCTLR_EL1
into X0
.
System register names end with _ELx
. The _ELx
specifies the minimum privilege necessary to access the register. For example:
SCTLR_EL1
requires EL1 or higher privilege.
SCTLR_EL2
requires EL2 or higher privilege.
SCTLR_EL3
requires EL3 privilege
Attempting to access the register with insufficient privilege results in an exception.
Note: Sometimes you will see _EL12
or _EL01
. These are used as part of virtualization. Refer to the guide on virtualization for more information.