SSAT and USAT

Signed Saturate and Unsigned Saturate to any bit position, with optional shift before saturating.

SSAT saturates a signed value to a signed range.

USAT saturates a signed value to an unsigned range.

Show/hideSyntax

op{cond} Rd, #sat, Rm{, shift}

where:

op

is either SSAT or USAT.

cond

is an optional condition code.

Rd

is the destination register.

sat

specifies the bit position to saturate to, in the range 1 to 32 for SSAT, and 0 to 31 for USAT.

Rm

is the register containing the operand.

shift

is an optional shift. It must be one of the following:

ASR #n

where n is in the range 1-32 (ARM) or 1-31 (Thumb)

LSL #n

where n is in the range 0-31.

Show/hideOperation

The SSAT instruction applies the specified shift, then saturates to the signed range -2sat-1 ≤ x ≤ 2sat-1 -1.

The USAT instruction applies the specified shift, then saturates to the unsigned range 0 ≤ x ≤ 2sat - 1.

Show/hideRegister restrictions

You cannot use PC for any register.

You can use SP in ARM instructions but these are deprecated in ARMv6T2 and above. You cannot use SP in Thumb instructions.

Show/hideCondition flags

If saturation occurs, these instructions set the Q flag. To read the state of the Q flag, use an MRS instruction.

Show/hideArchitectures

These ARM instructions are available in ARMv6 and above.

These 32-bit Thumb instructions are available in ARMv6T2 and above.

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

Show/hideExamples

    SSAT    r7, #16, r7, LSL #4
    USATNE  r0, #7, r5

Show/hideSee also

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0588B
Non-ConfidentialID062912