Primary mode programs receiving control

When a primary mode program receives control, it can save the calling program's registers on the linkage stack or in the caller-provided save area. If using the caller-provided save area, then distinctions are made as to whether the primary mode program is or is not changing the 64–bit GPRs. Each possibility is discussed below.

Note that the linkage conventions assume that a primary mode program does not use ARs. By leaving the contents of the ARs untouched, the program preserves ARs 2-13 across program linkages.

A primary mode program that uses the linkage stack must:
Conditions described for a primary mode program that uses the caller-provided save area:
Does not change 64–bit GPRs and that uses a 72–byte caller-provided save area, the program must:
Changes 64-bit GPRs and that uses the 72-byte caller-provided save area, the program must:
Changes 64-bit GPRs and that uses the 144-byte caller-provided save area, the program must: