This intrinsic inserts an
SSAT instruction into the instruction stream generated by the compiler.
It enables you to saturate a signed value from within your C or C++ code.
val, unsigned int
Is the value to be saturated.
Is the bit position to saturate to.
satmust be in the range 1 to 32.
__ssat intrinsic returns
saturated to the signed range -2sat-1 ≤ x ≤
The compiler does not recognize the
__ssat intrinsic when compiling for a
target that does not support the
SSAT instruction. The compiler generates
either a warning or an error in this case, depending on the source language:
- In C code:
Warning: #223-D: function "__ssat" declared implicitly.
- In C++ code:
Error: #20: identifier "__ssat" is undefined.