User`s guide
Inline Assembly Language and Intrinsics
Intrinsic Functions
147Targeting MC56F83xx/DSP5685x Controllers
Prototype
Word32 L_negate(Word32 lvar1)
Example
long result, l = 0xE0000000; /* - 0.25 */
result = L_negate(s1);
// Expected value of result: 0x20000000 = 0.25
Addition/Subtraction
The intrinsic functions of the addition/subtraction group are:
• add
• sub
• L_add
• L_sub
add
Addition of two 16-bit integer or fractional values, returning a 16-bit result.
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 add(Word16 src_dst, Word16 src2)