tions. The intrinsic function names are similar to their mnemonic assembly counter-
parts. For example, the following signed multiply±accumulate intrinsic
z _smac(z,x,y); /*Perform signed z zx*y */
will perform the equivalent assembly instruction
macm Xmem,Ymem,ACx
Table 6.4 lists the intrinsics supported by the TMS320C55x.
Table 6.4 Intrinsics provided by the TMS320C55x C compiler
C Compiler Intrinsic
(a,b,c are 16-bit and d,e,f are 32-bit data)
Description
c _sadd(int a, int b);
Adds 16-bit integers a and b, with SATA set,
producing a saturated 16-bit result c.
f _lsadd(long d, long e);
Adds 32-bit integers d and e, with SATD set,
producing a saturated 32-bit result f.
c _ssub(int a, int b);
Subtracts 16-bit integer b from a with SATA
set, producing a saturated 16-bit result c.
f _lssub(long d, long e);
Subtracts 32-bit integer e from d with SATD
set, producing a saturated 32-bit result f.
c _smpy(int a, int b);
Multiplies a and b, and shifts the result left
by 1. Produces a saturated 16-bit result c.
(upper 16-bit, SATD and FRCT set)
f _lsmpy(int a, int b);
Multiplies a and b, and shifts the result left
by 1. Produces a saturated 32-bit result f.
(SATD and FRCT set)
f _smac(long d, int a, int b);
Multiplies a and b, shifts the result left by 1,
and adds it to d. Produces a saturated
32-bit result f. (SATD, SMUL and FRCT
set)
f _smas(long d, int a, int b);
Multiplies a and b, shifts the result left by 1,
and subtracts it from d. Produces a 32-bit
result f. (SATD, SMUL and FRCT set)
c _abss(int a);
Creates a saturated 16-bit absolute value.
c jaj, _abss(0x8000) > 0x7FFF (SATA
set)
f _labss(long d);
Creates a saturated 32-bit absolute value.
f jdj, _labss(0x8000000) > 0x7FFFFFFF
(SATD set)
c _sneg(int a);
Negates the 16-bit value with saturation.
c À a, _sneg(0xffff8000) > 0x00007FFF
290
DESIGN AND IMPLEMENTATION OF IIR FILTERS