Packed-Data Processing on the ’C64x
8-5
’C64x Programming Considerations
Table 8–1. Packed data types
Element Size
Signed/Unsigned
Elements in 32-bit
word
Element type
Level of support
8 bits
16 bits
unsigned
signed
4
2
unsigned char
short
high
high
8 bits
16 bits
signed
unsigned
4
2
char
unsigned short
limited
limited
8.2.3
Storing Multiple Elements in a Single Register
Packed data types can be visualized as 8-bit or 16-bit partitions inside the larg-
er 32-bit register. These partitions are merely logical partitions. As with all
’C64x instructions, instructions which operate on packed data types operate
directly on the 64 general purpose registers in the register file. There are no
special packed data registers. How data in a register is interpreted is deter-
mined entirely by the instruction that is using the data. Figure 8–1 and
Figure 8–2 illustrate how four bytes and two half-words are packed into a
single word.
Figure 8–1. Four Bytes Packed Into a Single General Purpose Register.
Byte 3
Byte 2
Byte 1
Byte 0
General purpose
register
32 bits
8 bits
Byte 2
8 bits
Byte 1
8 bits
Byte 0
8 bits
Byte 3