User`s guide
Inline Assembly Language and Intrinsics
Intrinsic Functions
163Targeting MC56F83xx/DSP5685x Controllers
Example
short s1 = 0x2000;/* 0.25 */
short s2 = 0x2000;/* 0.25 */
long result;
result = L_mult(s1,s2);
// Expected value of result: 0.0625 = 0x08000000
L_mult_ls
Multiply one 32-bit and one-16-bit fractional value, generating a signed 32-bit
fractional result. Saturates only for the case of 0x80000000 x 0x8000.
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
Word32 L_mult_ls(Word32 linp1, Word16 sinp2)
Example
long l1 = 0x20000000;/* 0.25 */
short s2 = 0x2000;/* 0.25 */
long result;
result = L_mult(l1,s2);
// Expected value of result: 0.625 = 0x08000000