4.1.5 Unused Bits in Passed Data

Whenever data is passed by value between two procedures either in registers, as is the case for the first six input arguments and return values, or in memory, as is the case for arguments after the first six, the bits not used by the data are usually sign extended or zero extended as appropriate.

The table below defines the rules for setting or clearing the unused bits.

Key:

Table 4-2   Unused Bits in Passed Data



Data type

Type designator
Data size (bytes) Register extension type Memory extension type
byte logical BU 1 Zero64 Zero64
word logical WU 2 Zero64 Zero64
longword logical LU 4 Sign64 Sign64
quadword logical QU 8 Data64 Data64
byte integer B 1 Sign64 Sign64
word integer W 2 Sign64 Sign64
longword integer L 4 Sign64 Sign64
quadword integer Q 8 Data64 Data64
F floating F 4 Hard Data32
D floating D 8 Hard Data64
G floating G 8 Hard Data64
F floating complex FC 2 * 4 2 * Hard 2 * Data32
D floating complex DC 2 * 8 2 * Hard 2 * Data64
G floating complex GC 2 * 8 2 * Hard 2 * Data64
IEEE floating single S FS 4 Hard Data32
IEEE floating double T FT 8 Hard Data64
IEEE floating extended X FX 16 N/A N/A
IEEE floating single S complex FSC 2 * 4 2 * Hard 2 * Data32
IEEE floating double T complex FTC 2 * 8 2 * Hard 2 * Data64
IEEE floating extended X complex FXC 2 * 16 N/A N/A
Structures N/A   Nostd Nostd
Small arrays of 8 bytes or less N/A ≤≤ 8 Nostd Nostd
32-bit address N/A 4 Sign64 Sign64
64-bit address N/A 8 Data64 Data64

Note   Sign64 applied to a longword logical duplicates bit 31 through bits <63:32>, which may cause the 64-bit integer value to appear negative. However, careful use of 32-bit arithmetic and 64-bit logical instructions (but no right shifts) will preserve the 32-bit unsigned nature of the argument.

Because of the varied rules for sign extension of data when passed as arguments it is important that both calling and called routines agree on the data type of each argument. No implicit data type conversions can be assumed between the calling procedure and the called procedure.