4.7.48. 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 4.15.

Table 4.15. TI C55x intrinsics supported in RVCT

Intrinsics
_abss_lshrs_rnd_smas
_count_lsadd_norm_smpy
_divs_lsmpy_round_sneg
_labss_lsneg_roundn_sround
_lmax_lsshl_sadd_sroundn
_lmin_lssub_shl_sshl
_lnorm_max_shrs_ssub
_lshl_min_smac 

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 further 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.

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential