pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Table 45 Variable Alignment (continued)
NotesAlignmentData Type
Allowed in structures only with AUTO field
alignment.**
4.SGX pointers
Allowed in structures only with AUTO field
alignment.**
4Other 16-bit pointers
432-bit Pointer
864-bit Pointer***
4INT(32)
4REAL
Multiple UNSIGNED fields can be packed into a
doubleword.
4UNSIGNED(17-31)
8FIXED
8REAL(64)
* In pTAL, the alignment for all address types is 4, except SGBADDR, SGWADDR, EXT64ADDR, and
PROC64ADDR addresses for which the alignment is 2, 2, 8, and 8 respectively. In TAL, the alignment of all
address types is 2.
** The alignment of an array is the alignment of its element type.
*** 64-bit addressing functionality added to the EpTAL compiler starting with SPR T0561H01^AAP. For more
information, see Appendix E, “64-bit Addressing Functionality” (page 531).
• For compatibility with TAL, pTAL requires you to explicitly declare filler items to optimally align
a SHARED8 structure’s fields for RISC and Itanium architecture. pTAL does not add filler
automatically to SHARED8 structures and reports a syntax error if you do not declare filler
where a structure requires it. The compiler listing shows where each structure requires filler.
You must add filler:
◦ Before a field if the field’s offset from the beginning of the structure is not an integral
multiple of the field’s width (see Table 43 (page 119))
◦ If the total length of the structure or substructure would not be an integral multiple of the
structure or substructure’s widest field
◦ If an UNSIGNED(1-16) field would otherwise cross an even byte address
◦ If an UNSIGNED(17-31) field would otherwise cross a four byte address
• The address type of pointers in a SHARED8 structure must be EXTADDR, SGBADDR, or
SGWADDR.
• If the data type of a field in a SHARED8 structure is an address type, the type must be
EXTADDR, EXT32ADDR, EXT64ADDR, PROC32ADDR, PROC64ADDR, SGBADDR, or
SGWADDR, as shown in the following example:
STRUCT s FIELDALIGN(SHARED8);
BEGIN
EXTADDR x; ! OK: EXTADDR field
EXT32ADDR y; ! OK: EXT32ADDR field
EXT64ADDR z; ! OK: EXT64ADDR field
PROC32ADDR a; ! OK: PROC32ADDR field
FILLER 4;
PROC64ADDR b; ! OK PROC64ADDR field
INT .EXT ea; ! OK: EXTADDR pointer
INT .EXT32 e32a; ! OK: EXT32ADDR pointer
INT .EXT64 e64a; ! OK: EXT64ADDR pointer
INT.SG j; ! OK: SGWADDR pointer
130 Structures