User`s guide

Inline Assembly Language and Intrinsics
Intrinsic Functions
175Targeting MC56F83xx/DSP5685x Controllers
L_shlfts
Arithmetic left shift of 32-bit value by a specified shift amount. Saturation does occur
during a left shift if required.
NOTE
This is not a bidirectional shift.
Assumptions
Assumed s_shftamount is positive.
OMR’s SA bit was set to 1 at least 3 cycles before this code, that is, saturation on data
ALU results enabled.
Prototype
Word32 L_shlfts(Word32 lval2shft, Word16 s_shftamount)
Example
long result, l = 0x12345678;
short s1 = 3;
result = shlfts(l, s1);
// Expected value of result: 0x91A259E0
L_shr
Arithmetic shift of 32-bit value by a specified shift amount. If the shift count is
positive, a right shift is performed. Otherwise, a left shift is performed. Saturation may
occur during a left shift. When an accumulator is the destination, zeroes out the LSP
portion.
NOTE
This operation is not optimal on the DSP56800E because of the
saturation requirements and the bidirectional capability. See the
intrinsic L_shrtNs which is more optimal.