Notes on ARM Architecture

ARM Variants

Architecture Overview

Info about the Instruction Set

Execution Model

ARM follows a Simple Sequential Execution(SSE) model. The processor’s behavior should be consistent with the behavior of one instruction executed at a time in the same order as they appear in the memory.

Registers in ARM

General Purpose

31 general purpose registers can be used as X or W:

Note: W0 will be bottom 32 bits of X0, W1 will be bottom 32 of X1 and so on. The choice of X or W will determine whether the instruction is executed as 32 or 64 bits. When a W register is written onto a X register, the top 32 bits are zeroed.

32 registers used for floating point or vector operations as Bx, Hx, Sx, Dx, Qx or V:

Other Registers

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 need to read into an X register, operated on and then written back to the system register. There are two specialist instructions for accessing system registers:

System registers are specified by name. The names end with _ELx which specifies the minimum privilege necessary to access the register. EL1 requires EL1 or higher, EL2 requires EL2 or higher. Insufficient privilege will result in an exception.

ARM Assembly

ARM Assembly By Example