User`s guide

Inline Assembly Language and Intrinsics
Intrinsic Functions
160
Targeting MC56F83xx/DSP5685x Controllers
mult
Multiply two 16-bit fractional values and truncate into a 16-bit fractional result.
Saturates only for the case of 0x8000 x 0x8000. When an accumulator is the
destination, zeroes out the LSP portion.
Assumptions
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 mult(Word16 sinp1, Word16 sinp2)
Example
short s1 = 0x2000;/* 0.25 */
short s2 = 0x2000;/* 0.25 */
short result;
result = mult(s1,s2);
// Expected value of result: 0.625 = 0x0800
mult_r
Multiply two 16-bit fractional values, round into a 16-bit fractional result. Saturates
only for the case of 0x8000 x 0x8000. When an accumulator is the destination, zeroes
out the LSP portion.
Assumptions
OMR’s SA bit was set to 1 at least 3 cycles before this code, that is, saturation on data
ALU results enabled.
OMR’s R bit was set to 1 at least 3 cycles before this code, that is, 2’s complement
rounding, not convergent rounding.