Non-Confidential | PDF version | DUI0801J | ||

| ||||

Home > Advanced SIMD Programming > Saturating Advanced SIMD instructions |

Saturating instructions saturate the result to the value of the upper limit or lower limit if the result overflows or underflows.

The saturation limits depend on the datatype of the instruction. The
following table shows the ranges that Advanced SIMD saturating instructions saturate to,
where `x`

is the result of the operation.

**Table
9-3 Advanced SIMD saturation ranges**

Data type | Saturation range of `x` |
---|---|

Signed byte (`S8` ) |
-2^{7} <= `x` < 2^{7} |

Signed halfword (`S16` ) |
-2^{15} <= `x` < 2^{15} |

Signed word (`S32` ) |
-2^{31} <= `x` < 2^{31} |

Signed doubleword (`S64` ) |
-2^{63} <= `x` < 2^{63} |

Unsigned byte (`U8` ) |
0 <= `x` < 2^{8} |

Unsigned halfword (`U16` ) |
0 <= `x` < 2^{16} |

Unsigned word (`U32` ) |
0 <= `x` < 2^{32} |

Unsigned doubleword (`U64` ) |
0 <= `x` < 2^{64} |

Saturating Advanced SIMD arithmetic instructions set the QC bit in the floating-point status register (FPSCR in AArch32 or FPSR in AArch64) to indicate that saturation has occurred.

Saturating instructions are specified using a `Q`

prefix.
In A32/T32 Advanced SIMD instructions, this is inserted between
the `V`

and the instruction mnemonic, or between
the S or U and the mnemonic in A64 Advanced SIMD instructions.