| |||
| Home > Compiler-specific Features > C55x intrinsics | |||
The ARM compiler supports the emulation of selected TI C55x compiler intrinsics.
To make use of the TI C55x intrinsics in your own code, include
the standard header file c55x.h. The intrinsics
supplied in c55x.h are listed in Table 24.
Table 24. TI C55x intrinsics supported by the compilation tools
| Intrinsics | |||
|---|---|---|---|
_a_lsadd | _a_sadd | _a_smac | _a_smacr |
_a_smas | _a_smasr | _abss | _count |
_divs | _labss | _lmax | _lmin |
_lmpy | _lmpysu | _lmpyu | _lnorm |
_lsadd | _lsat | _lshl | _shrs |
_lsmpy | _lsmpyi | _lsmpyr | _lsmpysu |
_lsmpysui | _lsmpyu | _lsmpyui | _lsneg |
_lsshl | _lssub | _max | _min |
_norm | _rnd | _round | _roundn |
_sadd | _shl | _shrs | _smac |
_smaci | _smacr | _smacsu | _smacsui |
_smas | _smasi | _smasr | _smassu |
_smassui | _smpy | _sneg | _sround |
_sroundn | _sshl | _ssub | - |
#include <limits.h>
#include <stdint.h>
#include <c55x.h> // include TI C55x intrinsics
__asm int32_t asm_lsadd(int32_t a, int32_t b)
{
qadd r0, r0, r1
bx lr}
int32_t foo(int32_t a, int32_t b)
{
int32_t c, d, e;
c = asm_lsadd(a, b); // assembly language saturating add
d = __qadd(a, b); // ARM intrinsic saturating add
e = _lsadd(a, b); // TI C55x saturating add
return c == d == e; // returns 1
}