NZCV
32-bitFlagsThe four condition flags, packed into the top four bits of PSTATE. Most data-processing instructions write these as a side effect, and every conditional instruction reads them to decide whether to execute. Reachable directly through MRS and MSR, which is how software saves and restores flags.
Field layout
Current value hover a field to locate it
Fields
| Bits | Field | Bits | Value | Description |
|---|---|---|---|---|
| 31 | N[31] | 1 | 0x0 | Negative. Set when the result of the last flag-setting instruction was negative in two's complement, that is, when bit 63 (or bit 31 for a 32-bit operation) came out as 1. |
| 30 | Z[30] | 1 | 0x0 | Zero. Set when the result of the last flag-setting instruction was zero. On AArch64 there is no separate equality flag, so an unsigned comparison is the only kind that sets Z. |
| 29 | C[29] | 1 | 0x0 | Carry. For addition, set when the sum carried out of bit 63 (bit 31 for 32-bit). For subtraction, the inverse sense applies: C is set when there was no borrow. For a shift, it holds the last bit shifted out. |
| 28 | V[28] | 1 | 0x0 | Overflow. Set when a signed result cannot be represented in the destination width, that is, when the operands had the same sign and the result's sign differs from theirs. |
| 27:0 | — | 28 | Not assigned to a documented field. Values written here are reserved and should be treated as read-as-zero unless the architecture says otherwise. |