(old) | htmldiff from- | (new) |
The APSR characteristics are:
Hold program status and control information.
APSR is a 32-bit register.
The APSR 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 | RES0 | GE | RES0 | RES1 | RES0 |
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.
Reserved, RES0.
Greater than or Equal flags, for parallel addition and subtraction.
Reserved, RES0.
Reserved, RES1.
Reserved, RES0.
It is permitted that, on a read of APSR:
Bit[22] returns the value of PSTATE.PAN
Bit[9] returns the value of PSTATE.E.
Bits[8:6] return the value of PSTATE.{A, I, F}, the mask bits.
Bit[4:0] returns the value of PSTATE.M[4:0]
This is an exception to the general rule that an UNKNOWN field must not return information that cannot be obtained, at the current Privilege level, by an architected mechanism.
For more information see The Application Program State Register.
APSR can be read using the MRS instruction and written using the MSR (register) or MSR (immediate) instructions. For more details, see MRS, MSR (register), and MSR (immediate) in the Arm® Architecture Reference Manual, Armv8, for Armv8-A architecture profile.
2713/0312/20192018 2116:5942; e5e4db499bf9867a4b93324c4dbac985d3da93766379d01c197f1d40720d32d0f84c419c9187c009
Copyright © 2010-20192010-2018 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.
(old) | htmldiff from- | (new) |