13.133 SSAT
Signed Saturate to any bit position, with optional shift before saturating.
Syntax
SSAT
{
} cond
, #Rd
, sat
{, Rm
} shift
where:
cond
is an optional condition code.
Rd
is the destination register.
sat
specifies the bit position to saturate to, in therange 1 to 32.
Rm
is the register containing the operand.
shift
is an optional shift. It must be one of the following:
ASR #
n
where
is in the range 1-32 (A32) or 1-31 (T32)n
LSL #
n
where
is in therange 0-31.n
Operation
The SSAT
instruction applies the specified shift, then saturates a signed value to the signed range –2sat–1 ≤ x
≤ 2sat–1 –1.
Register restrictions
You cannot use PC for any operand.
You can use SP in A32 instructions but this is deprecated. You cannot use SP in T32 instructions.
Q flag
If saturation occurs, this instruction sets the Q flag. Toread the state of the Q flag, use an MRS
instruction.
Architectures
This instruction is available in A32 and T32.
There is no 16-bit version of this instruction in T32.
Example
SSAT r7, #16, r7, LSL #4