10.155 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 the following table.

Table 10-17 TI C55x intrinsics that the compilation tools support

_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 -


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.


#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
Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.