Data Definition Language (DDL) Reference Manual
DDL Alignment Rules for C
Data Definition Language (DDL) Reference Manual—529431-004
H-4
FIELDALIGN_SHARED8 Alignment Rules
FIELDALIGN_SHARED8 Alignment Rules
When you specify the FIELDALIGN_SHARED8 command, DDL uses the following
alignment rules:
•
The offset of each field (other than bit fields) in the structure from the base of the
structure must begin at an address that is an integral multiple of the width of the
field.
•
The offset of a substructure field must be an integral multiple of the widest field in
the substructure.
•
The offset of an array must be an integral multiple of an element of the array.
•
Bit fields are packed from the most significant bit to the least significant bit in a
word and can not overlap a 16-bit word boundary.
•
Explicit fillers are required to ensure that the components are properly aligned.
•
The structure must begin at an address that is an integral multiple of the width of
the widest field in the structure.
•
The size of a structure must be an integral multiple of its alignment. Explicit fillers
might be required to ensure this.
•
The minimum alignment for a struct or substruct is 16 bits.
•
The possible values for alignment are 1,2,4, or 8 bytes.