Current Program Status Register Value

In ARM architecture, the current program status register (CPSR) is an unbanked register, thus it refers to the same physical register in all processor modes. It contains condition code flags, interrupt disable bits, the current processor mode, and other status and control information. The state of the processor reflects changes in the flags and values within the CPSR. CPSR cannot be changed while in user mode, thus preventing the software from accessing privileged resources. However, CPSR values can be investigated within user mode, making it possible to distinguish the current processor mode at all times. Performance measurements may require such investigation of the CPSR in order to distinguish the modes and to select appropriate actions according to the mode. Without such precautions, exceptions or fault situations might take place.