The following command compiles prog.C to assembly code rather than to object code, and puts the assembly code in the file prog.s.
aCC
Data Alignment and Storage
This section describes default data storage allocation and alignment for HP compiler data types.
Data storage refers to the size of data types, such as bool, short, int, float, and char*. Data alignment refers to the way the HP compiler aligns data structures in memory. Data type alignment and storage differences can cause problems when moving data between systems that have different alignment and storage schemes. These differences become apparent when a structure is exchanged between systems using files or
For information on unaligned data access, See “Handling Unaligned Data” (page 101).
Table 3 lists the size and alignment of the HP compiler data types:
Table 3 Size and Alignment of HP Compiler Data Types
Data Type | Size (in bytes) | Alignment |
|
|
|
bool | 1 | |
|
|
|
char, unsigned char, signed | 1 | 1 |
char |
|
|
|
|
|
wchar_t | 4 | 4 |
|
|
|
short, unsigned short, signed | 2 | 2 |
short |
|
|
|
|
|
int, unsigned int | 4 | 4 |
|
|
|
long, unsigned long | 4* | 4* |
|
|
|
float | 4 | 4 |
|
|
|
__float80 | 16 | 16 |
|
|
|
__float128 | 16 | 8** |
|
|
|
_Decimal32 | 4 | 4 |
|
|
|
_Decimal64 | 8 | 8 |
|
|
|
_Decimal128 | 16 | 16 |
|
|
|
double | 8 | 8 |
|
|
|
long double | 16 | 8** |
|
|
|
long long, unsigned long long | 8 | 8 |
|
|
|
enum | 4 | 4 |
|
|
|
arrays | Size of array element type | Alignment of array element type |
|
|
|
struct | *** | |
|
|
|
union | *** | |
|
|
|
Size of declared type | Alignment of declared type | |
|
|
|
pointer | 4* | 4* |
|
|
|
*In
34