This intrinsic inserts a USAT instruction into
the instruction stream generated by the compiler. It enables you
to saturate an unsigned value from within your C or C++ code.
Syntax
int __usat(unsigned int val, unsigned int sat)
where:
val
Is the value to be saturated.
sat
Is the bit position to saturate to.
usat must be
in the range 0 to 31.
Return value
The __usat intrinsic returns val saturated
to the unsigned range 0 ≤ x ≤ 2sat -1.
Errors
The compiler does not recognize the __usat intrinsic
when compiling for a target that does not support the USAT instruction.
The compiler generates either a warning or an error in this case.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.