RTEMS TI C3x/C4x Applications Supplement
Processor in the Texas Instruments C3x/C4x family are word addressable. This is in sharp contrast to CISC and RISC processors that are typically byte addressable. In a word addressable architecture, each address points not to an 8-bit byte or octet but to 32 bits.
On first glance, byte versus word addressability does not sound like a problem but in fact, this issue can result in subtle problems in high-level language software that is ported to a word addressable processor family. The following is a list of the commonly encountered problems:
sizeof
returns very different results
on the C3x/C4x than on traditional RISC/CISC processors.
The sizeof(char)
, sizeof(short)
, and sizeof(int)
are all 1 since each occupies a single addressable unit that is
thirty-two bits wide. On most thirty-two bit processors,
sizeof(char
is one, sizeof(short)
is two,
and sizeof(int)
is four. Just as software makes assumptions
about the sizes of the primitive data types has problems
when ported to a sixty-four bit architecture, these same
assumptions cause problems on the C3x/C4x.
RTEMS TI C3x/C4x Applications Supplement
Copyright © 1988-2004 OAR Corporation