What is AArch64 versus AArch32?
Short answer: AArch64 is the 64-bit execution state using A64 instructions. AArch32 is the 32-bit state using A32 or T32 instructions, where supported. AArch64 instructions are 32 bits wide.
ADD W0, W1, W2 // 32-bit operation in AArch64
ADD X0, X1, X2 // 64-bit operation
1. Register and instruction differences
| Feature | AArch32 | AArch64 |
|---|---|---|
| General registers | R0–R12 plus SP, LR, PC | X0–X30 plus SP |
| Instruction sets | A32, T32 | A64 |
| Integer register width | 32 bits | 64 bits |
2. Example: X1 = 0x1234567800000001. Reading W1 returns 1. Writing W1 = 2 makes X1 = 2, because a W-register write clears the upper half.
3. Compatibility: A 64-bit CPU need not implement AArch32 at every exception level. Running 32-bit applications also requires kernel and userspace support.
Interview takeaway: Execution state determines the instruction set and register model; it does not by itself determine physical address width.
Register and instruction examples
// AArch64 (A64)
ADD X0, X1, X2
LDR W3, [X4]
// AArch32 (example A32 syntax)
ADD R0, R1, R2
LDR R3, [R4]
AArch64 provides 31 general-purpose X registers with 32-bit W views; AArch32 provides a different register and execution model, including R13/SP, R14/LR and R15/PC. A64 instructions are fixed 32-bit encodings even though many operands are 64 bits. Thumb instructions can use 16-bit or 32-bit encodings. An AArch64 kernel may support 32-bit userspace if the CPU and kernel configuration support AArch32 at EL0. Executable format, ABI, system-call convention and libraries must match the execution state. Do not equate 64-bit registers with a full 64-bit implemented virtual or physical address range.