Packed-Data Processing on the ’C64x
8-4
8.2
Packed-Data Processing on the ’C64x
8.2.1
Introduction to Packed Data Processing Techniques
Packed-data processing is a type of processing where a single instruction ap-
plies the same operation to multiple independent pieces of data. For example,
the ADD2 instruction performs two independent 16-bit additions between two
pairs of 16-bit values. This produces a pair of 16-bit results. In this case, a
single instruction, ADD2, is operating on multiple sets of data, the two indepen-
dent pairs of addends.
Packed-data processing is a powerful method for exploiting the inherent paral-
lelism in signal processing and other calculation-intensive code, while retain-
ing dense code. Many signal processing functions apply the same sets of op-
erations to many elements of data. Generally, these operations are indepen-
dent of each other. Packed-data processing allows the programmer to capital-
ize on this by operating on multiple pieces of data with a single compact stream
of instructions. This saves code size and dramatically boosts performance.
The ’C64x provides a rich family of instructions which are designed to work
with packed-data processing. At the core of this paradigm are packed data
types, which are designed to store multiple data elements in a single machine
register. Packed-data processing instructions are built around these data
types to provide a flexible, powerful, programming environment.
Note:
Although ’C6000 family supports both big-endian and little-endian operation,
the examples and figures in this section will focus on little endian operation
only. The packed-data processing extensions that the ’C64x provides will op-
erate in either big- or little-endian mode, and will perform identically on val-
ues stored in the register file. However, accesses to memory behave differ-
ently in big-endian mode.
8.2.2
Packed Data Types
Packed data types are the cornerstone of ’C64x packed-data processing sup-
port. Each packed data type packs multiple elements into a single 32-bit gener-
al purpose register. Table 8–1 below lists the packed data types that the ’C64x
supports. The greatest amount of support is provided for unsigned 8-bit and
signed 16-bit values.