You copied the Doc URL to your clipboard.

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 that the compilation tools support
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-

Restrictions

The C55x intrinsics are only supported on targets that support the __qadd, __qdbl, and __qsub intrinsics. Otherwise, no error message is generated, instead the compiler silently generates a call to a corresponding function __qadd, __qdbl, or __qsub.

Example

#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
}

See also

  • the header file c55x.h for more information on the ARM implementation of the C55x intrinsics

  • publications providing information about TI compiler intrinsics are available from Texas Instruments at http://www.ti.com.