The CPSR characteristics are:
Holds PE status and control information.
This register is part of the Process state registers functional group.
The CPSR can be read using the MRS instruction and written using the MSR (immediate) or MSR (register) instructions. For more details on the instruction syntax, see 'PSTATE and banked register access instructions' in the ARMv8 ARM, section F1.5.
There are no traps or enables affecting this register.
There is one instance of this register that is used in both Secure and Non-secure states.
CPSR is a 32-bit register.
The CPSR bit assignments are:
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
N | Z | C | V | Q | IT[1:0] | J | 0 | PAN | 0 | 0 | GE | IT[7:2] | E | A | I | F | T | 1 | M[3:0] |
Negative condition flag. Set to bit[31] of the result of the last flag-setting instruction. If the result is regarded as a two's complement signed integer, then N is set to 1 if the result was negative, and N is set to 0 if the result was positive or zero.
Zero condition flag. Set to 1 if the result of the last flag-setting instruction was zero, and to 0 otherwise. A result of zero often indicates an equal result from a comparison.
Carry condition flag. Set to 1 if the last flag-setting instruction resulted in a carry condition, for example an unsigned overflow on an addition.
Overflow condition flag. Set to 1 if the last flag-setting instruction resulted in an overflow condition, for example a signed overflow on an addition.
Cumulative saturation bit. Set to 1 to indicate that overflow or saturation occurred in some instructions.
IT block state bits for the T32 IT (If-Then) instruction. See IT[7:2] for explanation of this field.
RES0.
In previous versions of the architecture, the {J, T} bits determined the AArch32 Instruction set state. ARMv8 does not support either Jazelle state or T32EE state, and the T bit determines the Instruction set state.
Reserved, RES0.
Privileged Access Never. When ARMv8.1-PAN is implemented, defined values are:
PAN | Meaning |
---|---|
0 |
The translation system is the same as ARMv8.0. |
1 |
Disables privileged read and write accesses to addresses accessible at EL0. |
The value of this bit is usually preserved on taking an exception, except in the following situations:
When ARMv8.1-PAN is not implemented, this bit is RES0.
Reserved, RES0.
Reserved, RES0.
Greater than or Equal flags, for parallel addition and subtraction.
IT block state bits for the T32 IT (If-Then) instruction. This field must be interpreted in two parts.
The IT field is 0b00000000 when no IT block is active.
Endianness state bit. Controls the load and store endianness for data accesses:
E | Meaning |
---|---|
0 |
Little-endian operation |
1 |
Big-endian operation. |
Instruction fetches ignore this bit.
When the reset value of the SCTLR.EE bit is defined by a configuration input signal, that value also applies to the CPSR.E bit on reset, and therefore applies to software execution from reset.
If an implementation does not provide Big-endian support, this bit is RES0. If it does not provide Little-endian support, this bit is RES1.
If an implementation provides Big-endian support but only at EL0, this bit is RES0 for an exception return to any Exception level other than EL0.
Likewise, if it provides Little-endian support only at EL0, this bit is RES1 for an exception return to any Exception level other than EL0.
SError interrupt mask bit. The possible values of this bit are:
A | Meaning |
---|---|
0 |
Exception not masked. |
1 |
Exception masked. |
IRQ mask bit. The possible values of this bit are:
I | Meaning |
---|---|
0 |
Exception not masked. |
1 |
Exception masked. |
FIQ mask bit. The possible values of this bit are:
F | Meaning |
---|---|
0 |
Exception not masked. |
1 |
Exception masked. |
T32 Instruction set state bit. Indicates the AArch32 instruction set state. Possible values of this bit are:
T | Meaning |
---|---|
0 |
A32 state. |
1 |
T32 state. |
Reserved, RES1.
Current PE mode. Possible values are:
M[3:0] | Mode |
---|---|
0b0000 | User |
0b0001 | FIQ |
0b0010 | IRQ |
0b0011 | Supervisor |
0b0110 | Monitor |
0b0111 | Abort |
0b1010 | Hyp |
0b1011 | Undefined |
0b1111 | System |
Other values are reserved.
02/05/2017 15:43
Copyright © 2010-2017 ARM Limited or its affiliates. All rights reserved. This document is Non-Confidential.