pTAL Reference Manual (H06.03+)
Structures
HP pTAL Reference Manual—523746-005
9-23
SHARED8 Parameter
•
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 9-3 on page 9-9)
°
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.
UNSIGNED(1-16) 2 Multiple UNSIGNED fields can be packed in a word
or doubleword.
.SG pointers 2 .SG pointers are 16 bits in both pTAL and TAL.*
.SGX pointers 4 Allowed in structures only with AUTO field
alignment.**
Other 16-bit pointers 4 Allowed in structures only with AUTO field
alignment.**
32-bit Pointer 4
INT(32) 4
REAL 4
UNSIGNED(17-31) 4 Multiple UNSIGNED fields can be packed into a
doubleword.
FIXED 8
REAL(64) 8
Table 9-5. Variable Alignment (page 2 of 2)
Data Type Alignment Notes
* In pTAL, the alignment of all address types is 4, except SGBADDR and SGWADDR addresses for which the
alignment is 2. In TAL, the alignment of all address types is 2.
** The alignment of an array is the alignment of its element type.










