28.2.45 __builtin_ff1l, __builtin_ff1r
Architecture
dsPIC33A, dsPIC33C/E/F, dsPIC30
Description
Finds first one (1
) from left (Msb) or right (Lsb) in value. An example for
dsPIC33E:
int16_t result, value;
result = __builtin_ff1l(value);
might generate:
ff1l w4, w5
Prototype
int __builtin_ff1l(int value);
int __builtin_ff1r(int value);
For dsPIC33A, int
is int32_t
. For dsPIC33C/E/F
or dsPIC30, int
is int16_t
.
Argument
value
– Integer number to check for first
1
.
Return Value
Returns a literal value sign extended to represent the number of bits to shift left or right.
Machine Instruction
ff1l
fflr
Error Messages
None.