SPNU151V January 1998 – February 2020
Table 6-2 lists register and memory storage for various data types:
| Data Type | Register Storage | Memory Storage |
|---|---|---|
| char, signed char | Bits 0-7 of register(1) | 8 bits aligned to 8-bit boundary |
| unsigned char, bool | Bits 0-7 of register | 8 bits aligned to 8-bit boundary |
| short, signed short | Bits 0-15 of register(1) | 16 bits aligned to 16-bit (halfword) boundary |
| unsigned short, wchar_t | Bits 0-15 of register | 16 bits aligned to 16-bit (halfword) boundary |
| int, signed int | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| unsigned int | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| long, signed long | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| unsigned long | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| long long | Even/odd register pair | 64 bits aligned to 32-bit (word) boundary(2) |
| unsigned long long | Even/odd register pair | 64 bits aligned to 32-bit (word) boundary(2) |
| float | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| double | Register pair | 64 bits aligned to 32-bit (word) boundary(2) |
| long double | Register pair | 64 bits aligned to 32-bit (word) boundary(2) |
| struct | Members are stored as their individual types require. | Members are stored as their individual types require; aligned according to the member with the most restrictive alignment requirement. |
| array | Members are stored as their individual types require. | Members are stored as their individual types require; aligned to 32-bit (word) boundary. All arrays inside a structure are aligned according to the type of each element in the array. |
| pointer to data member | Bits 0-31 of register | 32 bits aligned to 32-bit (word) boundary |
| pointer to member function | Components stored as their individual types require | 64 bits aligned to 32-bit (word) boundary |
For details about the size of an enum type, see Table 5-2.