SPRUIG5E January 2018 – March 2023 TDA4VM , TDA4VM-Q1
The C6000 intrinsic names, which are defined in
c6x.h, do not conflict with any C7x intrinsic
names. Therefore, including both the migration
header c6x_migration.h
as well as
c7x.h
will not cause an issue.
Each C6000 intrinsic is mapped to either a single
C7000 instruction or a set of C7000 instructions
that perform or emulate the same behavior.
c7x.h
for the C7000 C-idiom for
that instruction.c7x.h
.For example, in c6x_migration.h
,
the _dadd
intrinsic is declared
and the mapped C7000 instruction, VADDW
, is indicated in the comment above the
declaration:
/* VADDW */
long long __BUILTIN _dadd(long long, long long);
In c7x.h
, the same instruction is
shown as well as its supported C-idiom, whether
that is a C intrinsic or operator:
VADDW
int = int + int;
int2 = int2 + int2;
int4 = int4 + int4;
int8 = int8 + int8;
int16 = int16 + int16;
cint = cint + cint;
cint2 = cint2 + cint2;
cint4 = cint4 + cint4;
cint8 = cint8 + cint8;
uint = uint + uint;
uint2 = uint2 + uint2;
uint4 = uint4 + uint4;
uint8 = uint8 + uint8;
uint16 = uint16 + uint16;
As another example, the _unpkbu4
intrinsic is declared, but there is no single
C7000 instruction to which it corresponds. So,
c7x.h
shows the C7000 C-idiom as
follows:
/*---------------------------------------------------------------------------*/
/* _unpkbu4 uses the VUNPKLUB and VUNPKHUB to unpack the low and high 2 */
/* bytes of the argument, and then constructs the result. An equivalent C7X */
/* piece of code would look like: */
/* */
/* ushort4 _unpkbu4(uchar4 src) */
/* { */
/* ushort4 dst; */
/* dst.lo = __unpack_low(src); */
/* dst.hi = __unpack_high(src); */
/* return dst; */
/* } */
/*---------------------------------------------------------------------------*/
long long __BUILTIN _unpkbu4(unsigned)
The following deprecated C6000 intrinsics are not
supported with the C7000 Compiler Tools. Use the
long long
variants instead:
The following aligned memory access intrinsics will not align input addresses: