28.2.25 __builtin_flim
Description
Force (Signed) Data Range Limit. Simultaneously compares a 16-bit signed data value to a maximum signed limit value and a minimum signed limit value.
If the data value is greater than the maximum, the data value is set to the maximum value.
If the data value is less than the minimum, the data value is set to the minimum value.
If the data value is within the maximum-minimum values, the data value is not changed.
Prototype
int __builtin_flim(int value, int high, int
low);
Argument
value
– Data value
high
– Maximum limit value
low
– Minimum limit value
Return Value
Returns value clamped between high and low.
Assembler Operator/ Machine Instruction
flim
Error Messages
None