28.2.68 __builtin_lshiftrt_32_16
Architecture
dsPIC33C/E/F, dsPIC30
Description
32-bit shift by n
for use when the you know that
n
will never be larger than 16 bits; the
compiler may not be able to determine that. This builtin will produce incorrect answers
for shifts larger than 16.
Prototype:
uint32_t __builtin_lshiftrt_32_16(uint32_t X, uint16_t N);
Arguments
X
- 32-bit unsigned number to be shifted
N
- Shift amount of no more then 16 bits
Return Value
The value of X shifted by N.
Example Instruction Sequence
subr w4,#16,w5
sl w3,w5,w5
lsr w3,w5,w1
lsr w2,w4,w0
ior w0,w5,w0
Error Messages
None.