User`s guide
Inline Assembly Language and Intrinsics
Intrinsic Functions
146
Targeting MC56F83xx/DSP5685x Controllers
Prototype
Word16 negate(Word16 svar1)
Example
int result, s1 = 0xE000; /* - 0.25 */
result = negate(s1);
// Expected value of result: 0x2000 = 0.25
L_abs
Absolute value of a 32-bit integer or fractional value returning a 32-bit result. Returns
0x7FFFFFFF for an input of 0x80000000.
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_abs(Word32 lvar1)
Example
long result, l = 0xE0000000; /* - 0.25 */
result = L_abs(s1);
// Expected value of result: 0x20000000 = 0.25
L_negate
Negates a 32-bit integer or fractional value returning a 32-bit result. Returns
0x7FFFFFFF for an input of 0x80000000.
Assumptions
OMR’s SA bit was set to 1 at least 3 cycles before this code, that is, saturation on data
ALU results enabled.