Download Target Settings

Transcript
In li ne A sse mb l y L a n g u ag e a nd In t rin si cs
Intrinsic Functions for Math Support
shlfts
Definition
Note
Assumptions
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.
This is not a bidirectional shift.
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
Example
Word16 shlfts(Word16 sval2shft, Word16
s_shftamount)
short result;
short s1 = 0x1234;
short s2 = 3;
result = shlfts(s1,s2);
// Expected value of result: 0x91a0
Targeting DSP56800E
DSP–149