User`s guide

Inline Assembly Language and Intrinsics
Intrinsic Functions
170
Targeting MC56F83xx/DSP5685x Controllers
Example
short result;
short s1 = 0x1234;
short s2 = 1;
result = shlftNs(s1,s2);
// Expected value of result: 0x2468
shlfts
Arithmetic left shift of 16-bit value by a specified shift amount. Saturation does occur
during a left shift if required. When an accumulator is the destination, zeroes out the
LSP portion.
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
Word16 shlfts(Word16 sval2shft, Word16 s_shftamount)