User`s guide
Inline Assembly Language and Intrinsics
Intrinsic Functions
154
Targeting MC56F83xx/DSP5685x Controllers
Example
long l = 0x87654321;
short result;
result = extract_l(l);
// Expected value of result: 0x4321
L_deposit_h
Deposits the 16-bit integer or fractional value into the upper 16 bits of a 32-bit value,
and zeroes out the lower 16 bits of a 32-bit value.
Prototype
Word32 L_deposit_h(Word16 ssrc)
Example
short s1 = 0x3FFF;
long result;
result = L_deposit_h(s1);
// Expected value of result: 0x3fff0000
L_deposit_l
Deposits the 16-bit integer or fractional value into the lower 16 bits of a 32- bit value,
and sign extends the upper 16 bits of a 32-bit value.
Prototype
Word32 L_deposit_l(Word16 ssrc)