Non-Confidential | PDF version | DUI0801J | ||
| ||||
Home > A32 and T32 Instructions > Saturating instructions |
Some A32 and T32 instructions perform saturating arithmetic.
The saturating instructions are:
QADD
.
QDADD
.
QDSUB
.
QSUB
.
SSAT
.
USAT
.
Some of the parallel instructions are also saturating.
Saturation means that, for some value of 2^{n} that depends on the instruction:
For a signed saturating operation, if the full result would be less than -2^{n}, the result returned is -2^{n}.
For an unsigned saturating operation, if the full result would be negative, the result returned is zero.
If the full result would be greater than 2^{n}-1, the result returned is 2^{n}-1.
When any of these occurs, it is called saturation. Some instructions set the Q flag when saturation occurs.
MSR
instruction.
The Q flag can also be set by two other instructions, but these instructions do not saturate.