
ML674001 Series/ML675001 Series User’s Manual
Chapter 2 CPU
2-3
2.8
Registers
The CPU has a total of 31 general-purpose 32-bit registers and six status registers. Not all registers are available
simultaneously, however. The registers which a program can access depends on the CPU operation state and
operating mode.
2.8.1
ARM State Registers
The ARM state provides access to 16 general-purpose registers and the current program status (CPSR)
register at all times.
Non-user, privileged modes access their own private register banks and usually a private save program status
register (SPSR).
Figure 2.2 indicates these private registers with shaded triangles.
The ARM state provides direct access to the sixteen registers R0 to R15. All but R15 are general-purpose
registers.
There is also a seventeenth register, CPSR, which contains control and status information.
Register 14
This register functions as the subroutine link register because the branch with link (BL) instruction
automatically copies the contents of R15 here. When not used for this purpose, this register is available
for use as a general-purpose register.
The corresponding bank registers R14_svc, R14_irq, R14_fiq, R14_abt, and R14_und hold the return
address for an interrupt or exception handler or a BL instruction executed within such a handler.
Register 15
This register is reserved for use as the program counter (PC). In the ARM state, the program counter is in
bits 31 to 2, and bits 0 and 1 are always zero. In the THUMB state, the program counter is in bits 31 to 1,
and bit 0 is always zero.
Register 16
This is the current program status register (CPSR). It contains the four condition code flags and bits
specifying the current operating mode.
The FIQ mode has seven bank registers (R8_fiq to R14_fiq) mapped to R8 to R14. Having these registers
available means that many FIQ handlers do not have to save registers to the stack.
The User, IRQ, Supervisor, Abort, and Undefined modes have two bank registers mapped to R13 and R14.
These modes use these registers as a private stack pointer and a link register.