4.6.3. SSAT16 and USAT16

Parallel halfword Saturating instructions.

SSAT16 saturates a signed value to a signed range.

USAT16 saturates a signed value to an unsigned range.

Syntax

op{cond} Rd, #sat, Rn

where:

op

is one of:

SSAT16

Signed saturation.

USAT16

Unsigned saturation.

cond

is an optional condition code (see Conditional execution).

Rd

is the destination register.

sat

specifies the bit position to saturate to, and is in the range 1 to 16 for SSAT16, or 0 to 15 for USAT16.

Rn

is the register holding the operand.

Do not use r15 for Rd or Rn.

Operation

Halfword-wise signed and unsigned saturation to any bit position.

The SSAT16 instruction saturates each signed halfword to the signed range -2sat-1 ≤ x ≤ 2sat-1 -1.

The USAT16 instruction saturates each signed halfword to the unsigned range 0 ≤ x ≤ 2sat -1.

Condition flags

If saturation occurs on either halfword, these instructions set the Q flag. To read the state of the Q flag, use an MRS instruction (see MRS).

Architectures

These ARM instructions are available in ARMv6 and above.

These 32-bit Thumb instructions are available in ARMv6T2 and above, except the ARMv7-M profile.

There are no 16-bit Thumb versions of these instructions.

Examples

    SSAT16  r7, #12, r7
    USAT16  r0, #7, r5

Incorrect examples

    SSAT16  r1, #16, r2, LSL #4 ; shifts not permitted with halfword saturations
Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J
Non-ConfidentialID101213